View Full Version : faster opengl display times
03-12-2002, 08:49 AM
i'm drawing an object in openGL, a knot to be exact, that is made up of spheres and cylinders. i use around 1000 cylinders. the spheres are drawn based on given points and i then use the points to rotate and translate the cylinders. the cylinders have around 15 stacks and slices, and the bulk of the math is cross products and normalizing vectors. the display time of this with an average computer with a geforce on linux is around 15 sec. does anyone have any advice on how to optimize this. i though of using inline assembly and SIMD instructions for the math but it was not much help. i'm assuming that if i can speed up the math for figuring out the cylinders that the process will be much faster. but how can i do this. any help is appreciated. Incus.
Do the relative coordinates of the knot change once it's been created? Can't you cache the vertices in display lists or vertex arrays? It might even be possible to store all of the geometry on the card (if you have the right card/drivers) to maximize framerate.
03-12-2002, 09:25 AM
I have to imagine that putting your geometry in a display list would speed things up... I'll leave other ideas to the more experienced people on here. http://www.opengl.org/discussion_boards/ubb/smile.gif
03-12-2002, 09:39 AM
excellent. thanks for the replys. as for the coordinates changing yes. new coordinates will be printed into a .txt file and then reread into the program. this is slow but it may not occur that much. as for cacheing the vertices what do you mean. once i figure them out put them into an array and the use that for redisplaying? also how do i display it all using the vid card? i'm using linux and the drivers i use are the ones from nvidia. its a geforce 256 32mb ddr. thanks for any futhur input. Incus
03-12-2002, 09:49 AM
I have to seriously question why you would need to write to a .txt file...
03-12-2002, 09:54 AM
i'm integrating this program with another program that outputs the coordinates to a .txt file i suppose that i could just put them into an array or something but i've yet to actually integrate them, my main concern now is to speed up the math. Incus
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.