Free web host - OpenGL Super Bible! Page 315 Figure 9-8 Output

OpenGL Super Bible! Page 315 Figure 9-8 Output from AMBIENT when the light source is cut in half You can see how we might reduce the ambient light in a scene to produce a dimmer image. This is useful for simulations in which dusk approaches gradually or when a more direct light source is blocked, as when an object is in the shadow of another, larger object. Listing 9-1 Set up for ambient lighting conditions // This function does any needed initialization on the rendering // context. Here it sets up and initializes the lighting for // the scene. void SetupRC() { // Light values // Bright white light GLfloat ambientLight[] = { 1.0f, 1.0f, 1.0f, 1.0f }; out glEnable(GL_DEPTH_TEST); glEnable(GL_CULL_FACE); glFrontFace(GL_CCW); // Hidden surface removal// Do not calculate inside of jet// Counter clock-wise polygons face // Lighting stuff glEnable(GL_LIGHTING); // Enable lighting // Set light model to use ambient light specified by ambientLight[] glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambientLight) ; glEnable(GL_COLOR_MATERIAL); // Enable Material color tracking // Front material ambient and diffuse colors track glColor glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE);
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Leave a Reply