PDA

View Full Version : Speed



cont103
07-08-2002, 12:06 PM
Hi,
I have a code like this:
void display(void)
{ disp++;
glClear(GL_COLOR_BUFFER_BIT
| GL_DEPTH_BUFFER_BIT);
glCallList(a_large_bit_map_file);
glutSwapBuffers()
if(disp==200) exit(0);
glutPostRedislay()
}

the total time to draw the scene 200 times is very high. Could you give me some advices about different techniques to reduce the total time? (in fact a draw different bitmap files in each display)
Another question: is there a way to select the software or hardware acceleration in opengl?
Thanks.

Bob
07-08-2002, 12:14 PM
What are you trying to do? Draw a series of images onto the screen?

Hardware acceleration is used automatically if it's available.

Miguel_dup1
07-10-2002, 11:45 AM
Just add a counter that represent a time unit such as milisecs and then every so many milisecs, you can do the drawing...
That is a way to sync things in an engine...

http://www.opengl.org/discussion_boards/ubb/smile.gif

cont103
07-10-2002, 11:29 PM
My aim is not to synchronize but the display the scene as fast as I can. For this I search some ways to display the scene faster than the code above.
Thanks anyway.

coredump
07-11-2002, 05:36 AM
seems to me you have two choices:

1) reduce the size of the bitmap file
2) buy a faster machine

b