PDA

View Full Version : How to turn on/off light between 2D and 3D object



zhangjunyue
04-01-2004, 10:11 PM
I write some source codes to draw using OpenGL.
Some entitis are 2D, others are 3D. Here is my sample codes:

//initial, light is on.

glDisable(GL_LIGHTING);
...
draw 2d entities.
...
glEnable(GL_LIGHTING);

...
draw 3d entites.
...

I found there is not shading on 3D entities, why? Could anyone give me some suggestions?

Tom Nuydens
04-01-2004, 10:56 PM
Moving to the beginners forum.

-- Tom