JavaScript EditorFree JavaScript Editor     Ajax Editor 



Main Page
Previous Page
Next Page

9.5. No Lighting

If no enabled lights are in the scene, it is a simple matter to pass the pervertex color and secondary color for further processing with the commands shown in Listing 9.14.

Listing 9.14. Setting final color values with no lighting

if (SecondaryColor)
    gl_FrontSecondaryColor = gl_SecondaryColor;

// gl_FrontColor will be clamped automatically by OpenGL
gl_FrontColor = gl_Color;


Previous Page
Next Page




JavaScript EditorAjax Editor     JavaScript Editor