Archived

This topic is now archived and is closed to further replies.

Xero-X2

Best ways to speed up programs?

Recommended Posts

Ok, well I would just like some input on how other programmers speed up their opengl programs up. From what I know drawing stuff that you can''t see is a complete waste of time, so may be you could tell me about a few diffrent techniques in this area?

Share this post


Link to post
Share on other sites
I''ve always found that optimizing a program brings a lot of extra speed.

Seriously though, for graphics, there are many algos which will help. Backface Culling is one of the simplest ones. YOu may want to look into Progressive LOD, Quadtrees, BSP trees, Octrees for landscape.

The first thing to do in order to speed up its execution is to do a profile build and identify slow spots.

____________________________________________________________
Direct3D vs. OpenGL

Share this post


Link to post
Share on other sites
The basics : for things that do not change, use display lists (the gfx card will figure out what to do with them). For things that rarely change, use vertex arrays (esp. if you have high performance vx arrays). Always prefer the vector operations to the scalar ones.

And so on (read the optimisation hints in the Red Book).

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]

Share this post


Link to post
Share on other sites