Sebaot
03-15-2001, 08:06 AM
Greets,
I've got a piece of code on my Windows-box that I found and now worked on for a while.
It's a texture-mapped rotating cube. When I tried to apply motion-blur with GlAccum, it just brought the system (1.2Ghz, GeForce2, 512MB RAM) to its knees. I figured it could be done better.
Been scouring some docs, and read about PopMatrix and PushMatrix, but not sure if that is something I should implement for this spinning cube, so I want your opinion on it.
The render-code looks like:
BEGIN CODE
--
glLoadIdentity
glClear clrColorBufferBit Or clrDepthBufferBit
glTranslatef 0#, 0#, -5#
glRotatef rot, 1#, 1#,1#
glBindTexture glTexture2D, gaTextures(0)
glBegin GL_QUADS
... DrawStuff
glEnd
rot = rot + 1
If rot = 360 Then rot = 0
--
END CODE
How could I speed this baby up so the motion-blur works without a hitch? I know _nothing_ about how to apply PopMatrix and PushMatrix in this matter.
Best regards,
Tom
I've got a piece of code on my Windows-box that I found and now worked on for a while.
It's a texture-mapped rotating cube. When I tried to apply motion-blur with GlAccum, it just brought the system (1.2Ghz, GeForce2, 512MB RAM) to its knees. I figured it could be done better.
Been scouring some docs, and read about PopMatrix and PushMatrix, but not sure if that is something I should implement for this spinning cube, so I want your opinion on it.
The render-code looks like:
BEGIN CODE
--
glLoadIdentity
glClear clrColorBufferBit Or clrDepthBufferBit
glTranslatef 0#, 0#, -5#
glRotatef rot, 1#, 1#,1#
glBindTexture glTexture2D, gaTextures(0)
glBegin GL_QUADS
... DrawStuff
glEnd
rot = rot + 1
If rot = 360 Then rot = 0
--
END CODE
How could I speed this baby up so the motion-blur works without a hitch? I know _nothing_ about how to apply PopMatrix and PushMatrix in this matter.
Best regards,
Tom