Jump to content
  • Advertisement
Sign in to follow this  
stroma

glutWireTeapot very slow???

This topic is 4947 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
store it in a display list, otherwise it has to recompute it every frame

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
>>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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!