Advertisement

OpenGL optimisation

Started by February 25, 2002 05:56 PM
5 comments, last by bangz 22 years, 8 months ago
Hello, I''ve been programming in OpenGL for about 2 months now and have been working though the tutorials on nehe! Now, my current project has been to generate a random 3D landscape which i did sucesfully... The problem I face is its drawing 800 triangles (for the whole world) and i only seem to get a frame rate of around 70fps, this seems a little slow seeings as only a third of the triangles are in view @ any one time?! I was wondering how the professionals deal with outdoor engines... Because they seem to be able to draw a lot more! Any help would be appricaited, If you need any more info just ask, Thanks, bangz.
you must remember fill rate. I don''t know your current 3d card, but you could draw 1 triangle and get 70 fps if you have resolution and color depth too high for your card to handle any faster

perhaps that is the reason you only have 70 fps.
however, that is not a problem, it just means you can draw more smaller triangles.
XanGame ProgrammerVolition Inc.
Advertisement
ah, so its not only the number of triangles but also the area of which the graphics card has to fill... That would makes sense! :-D

For your knowledge I tested it on my Matrox G450, 16bit, 600*480 (70fps) and on a mates GeForce 2, 16bit, 600*480 (90fps).


thanks for the help,
bangz.
Although Xanthen is right about fillrate being a limiting factor, I don''t think that''s the problem you''re having. I say this for two reasons:
  1. I have a demo I''ve been working on that displays ovver 1000 terrain triangles, 50 billboarded trees, and a 3000 triangle animated model. I''m getting over 140 fps on my Geforce 1.
  2. The numbers 70 and 90 are always suspect, since they match common monitor refresh rates.

Your problem is that vsync is enabled by default on the machines you''re testing. Go into your video card settings, and under OpenGL, find the combo box labeled "vertical sync". Set it to "Disabled by default". Now try running your demo again.

You can also disable vsync programmatically using the WGL_EXT_swap_control extension.
Pulling ~350fps with 27,000 tris in my terrain engine

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
Try a TNT1 you might not get as much performances

i think the days of optimizations are nearing and end...
May the code be with us !
Advertisement
Indeed... on such high speed computers, who cares for those really small performance upgrades? I think it won''t be very hard to make a 50-FPS game in the future... about everyone can do it

This topic is closed to new replies.

Advertisement