PDA

View Full Version : more on light



grimoire
06-09-2004, 04:44 PM
I want to rotate a figure that has lighted properties. I use the glIdleFunc() with an incrementation of the first argument of GlRotatef() in glDisplayFunc() ex
float num=0.0;
...
void display(void){
...
glRotatef(num,0.0,0.0,1.0);
...
num+=.02;
glIdleFunc(display);But when I do this with lighing calculations it is blocky and choppy. How do I rotate without these drawbacks?

Tolga Dalman
06-09-2004, 06:33 PM
hi,

did you swap your buffers (glutSwapBuffers() at the end of each frame) ?

regards,
Tolga Dalman

grimoire
06-09-2004, 07:08 PM
thanx man. I changed the opengl programming one to perspective instead of ortho and forgot to change the single to double. It works great now