glutWireTeapot very slow???

Started by
16 comments, last by Solias 19 years, 3 months ago
hi, i made a simple program to show glut primitives like teapot, cube, torus... i realised that wire teapot reduces FPS a lot. with the single window a take about 1800 fps, but with just a glutWireTeapot it downs to 100? (if solid it is 300) is teapot soo high poly and is it normal? or am i making something wrong? how can i up the fps? (i use back face culling, and do not make any color/blend/texture operation) Thank you...
+-+-+-+-+-STR
Advertisement
store it in a display list, otherwise it has to recompute it every frame
i know display lists but i just want to know if this framerate is normal? i mean do i make some settings wrong? are there any other function for initGL like backface culling?
thank you..
+-+-+-+-+-STR
if you were asking, you can turn on/off backface culling iwth glEnable()/glDisable() GL_CULL_FACE, but anywho, as far as the teapot goes, i dont think theres much you can do about it, it is fairly high poly, a few things to think about are: is textureing turned off? is lighting on or off? is it windowed or fullscreen (though ive heard the difference is becomming less and less of a problem) but anyways, yeah

hope that helps
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
ok, good, so i do not make any setting wrong.. [smile]
Thank you! [wink]
+-+-+-+-+-STR
Don't care about the fps when it's not drawing anything.
It's of course insanely fast if it only has to render a black buffer.
Don't care about the fps when it's that high.
When you draw something it will (on my card) fall 100-200 fps and therefore cannot be acounted with. There's a logical/technical explanation behind this, but just telling it like this, should be enough for you.

I'm guessing you're a beginner to OpenGL and especially the graphics card, since this sort of fps drop could surprise you. But don't worry, just keep learning, and your fps will rise as you learn and try (it did indeed for me ;)).

Also, don't use GLUT (it will ease your work now, but you won't be able to optimize it, which will be needed if you draw more), make the models in a 3D program like Milkshape 3D, Blender or Cinema 4D CE 6 (all free programs) and import them (then you'll have to make a 3ds loader or such, but more experience :P).
Then you can experiment on how to sort and draw the polygons to make most fps. All the programs I've mentioned can make cubes and torus' plus many other primitives (and Cinema also makes humans), but not teapots (well, don't know about Milkshape, but guessing).
This may not be the best for one primitive as you're drawing right now, but which game only had 1 primitive? (don't answer, I know some had...)
You should rather be worrying about drawing 1 million triangles at 100 fps (depends on you card of course) instead of a teapot at 100 fps. Because when you reach the lower fps (< 1000 on my card), then it won't change that much if you draw 10000 triangles more (still, depends on the card, but just erase a couple of 0's on all the numbers, then the point will still remain on lower-end cards).

Learn something about static VBO's (this will make the biggest difference), display lists, culling, import your own teapot (as close to the GLUT one as you can get) and then render them as fast as possible and you'll probaly see a way higher fps count (otherwise, try more and more teapots untill your old, slow, method is too slow). The VBO's wont help if the teapot is below 100 triangles (because the VBO's are slow to set up every frame, but nothing compared to drawing 10000 triangles without them), but rendering a couple of thoudsands of triangles, then you'll see a major change in fps.

Well, I don't know if your card is able to use VBO's, but if it's newer than G3 then it should be able to (probaly also lower than that, but haven't checked it). You can always check the if an extension like VBO is available with glGet or glGetString (don't remember what it's called).
Killers don't end up in jailThey end up on a high-score!
thanks for reply but i think noone understand my problem. [sad] i know fps will decrease and i am not suprised for that(i just dont want to tell my pc specs so i give the blank window framerate), in lots of my programs wireframe mode makes fps better. i mean lines are fast from polygons. (even if they are not textured) and i was making this program for my tutorial. not for learning. just realised that wireteapot gives 100 fps and solid gives 300.. so i just wanted to know if there are any special functions for lines in opengl that i did not set? and i asked that if it is normal because it is not normal for me as i tell. [wink]
what about your programs? in wireframe mode do they give higher or lower fps?
thank you..
+-+-+-+-+-STR
Lower fps in wireframe mode. Something like yours, and I've read the reason somewhere on the net, when I first discovered this "problem", but I've forgotten that now when I need it, of course :P

If you use glPolygonMode with GL_LINES, then I'm pretty sure that the calulations are done in software, so therefore it's slower...

EDIT: just found this thread, which pretty much explains the fps drop: http://www.gamedev.net/community/forums/topic.asp?topic_id=215416
Killers don't end up in jailThey end up on a high-score!
Thank you! that was what i am looking for...
+-+-+-+-+-STR
>>If you use glPolygonMode with GL_LINES, then I'm pretty sure that the calulations are done in software, so therefore it's slower.<<

naw if it was software itll be a lot slower, my understanding is most drivers in wireframe will draw very thin triangles (so they look like lines) ie each triangle is infact drawn as 3 triangles in wireframe

This topic is closed to new replies.

Advertisement