PDA

View Full Version : glutPostRedisplay problems



mmr
02-03-2004, 07:50 AM
Hello there, I'm Marcio Ribeiro from Brazil and just started out trying to write some C + OpenGL (GLUT) code.
I did managed to write some stuff that rotates a Torus (doughnut) with keyboard interaction (when i press r it rotates clockwise and with R anti-clockwise), so far so good. The problem appears when i just keep r or R pressed, i can clearly see the window redrawing itself (glutPostRedisplay calling my display backend), is there anyway to make it smoother (like games does)?

My machine isnt too fast (Celeron 400Mhz, 128Mb RAM, ATI Rage 3D Pro) tough.

Thanks for any help.
My mail: mmr@b1n.org

nexusone
02-03-2004, 11:41 AM
You want to use double buffering, check out some of my glut examples on my website www.angelfire.com/linux/nexusone/ (http://www.angelfire.com/linux/nexusone/)



Originally posted by mmr:
Hello there, I'm Marcio Ribeiro from Brazil and just started out trying to write some C + OpenGL (GLUT) code.
I did managed to write some stuff that rotates a Torus (doughnut) with keyboard interaction (when i press r it rotates clockwise and with R anti-clockwise), so far so good. The problem appears when i just keep r or R pressed, i can clearly see the window redrawing itself (glutPostRedisplay calling my display backend), is there anyway to make it smoother (like games does)?

My machine isnt too fast (Celeron 400Mhz, 128Mb RAM, ATI Rage 3D Pro) tough.

Thanks for any help.
My mail: mmr@b1n.org

mmr
02-04-2004, 10:13 AM
Ahh, nice http://www.opengl.org/discussion_boards/ubb/smile.gif
Its smooth now.

Thank you.


Originally posted by nexusone:
You want to use double buffering, check out some of my glut examples on my website www.angelfire.com/linux/nexusone/ (http://www.angelfire.com/linux/nexusone/)