User forums > Using Code::Blocks

HUGE openGL frame rate difference between Code::Blocks and VS2005

<< < (3/4) > >>

Vampyre_Dark:

--- Quote from: Michael on May 04, 2006, 02:53:19 pm ---Look interesting :).

I also find this one not bad at all:

http://www.sgi.com/tech/stl/

Best wishes,
Michael


--- End quote ---
:lol:
I like the one I was using because it was quicker to find the functions I was looking up when I was using vectors for the first time a few months ago.  :lol:

killerbot:
"smart use of stl is very important" otherwise you might have very surprising results. Last year I was at a C++ conference in Vegas, during that conference I followed a workshop from Scott Meyers on using the stl wisely.

He gave an example of a very stupid test case about strings, 10000 times 1 character was added to the string, no innitial reserve calls were made. The Gnu compiler/stl reallocated exponentially, but the M$ compiler/stl allocated linearly by an increlent of ...... "1".
It is for sure that in this scenario one will get very different performance results.

killerbot:

--- Quote from: Vampyre_Dark on May 04, 2006, 03:04:52 pm ---
--- Quote from: Michael on May 04, 2006, 02:53:19 pm ---Look interesting :).

I also find this one not bad at all:

http://www.sgi.com/tech/stl/

Best wishes,
Michael


--- End quote ---
:lol:
I like the one I was using because it was quicker to find the functions I was looking up when I was using vectors for the first time a few months ago.  :lol:

--- End quote ---

for the non digital, paper prefering people : Jossutis's book on STL. Very good book to learn from and on the other hand a very good reference book.

thomas:

--- Quote from: Vampyre_Dark on May 04, 2006, 02:47:59 pm ---When I toggle my app between immediate mode and using arrays with just 4400 triangles, there is a HUGE difference. That's (4400 * 9) calls in the place of the just 6 calls it takes me to get m 6 different types of objects drawn. Immediate Mode in my scene still operates around 60~ fp, however, I'm not using shaders or any advanced extensions. Using arrays I get into the ~100-200fps zone.
--- End quote ---
There is another huge difference. Immediate mode is something you can explain to every computing noob. You can tell them: "look, it works like this, you have vertices and you build triangles from them". Everybody will understand. Talk to them about binding a vertex buffer, and no one will follow.
If you are teaching CG basics, you will want to show them some 3d objects and rotate them around, some texturing maybe, show off a few shaders, but that's it.
You don't write Doom 3. You don't need to calculate pathfinding, you don't need to evaluate whether or not a NPC will shoot at you, no music, no network, nothing of that kind.
Consequentially, you don't care whether you lose some performance to immediate mode, it is still good enough. 100 frames are not any better than 60. As long as you get more than 30 fps, the human eye is not aware of it. TV has 25 frames, and you don't see it. For demonstrating something in a teaching session that is absolutely ok (well, except if the session is about using vertex buffers... :)).

Apart from that, vertex buffers (or vertex arrays, likewise) are a lot harder to implement, as it is a lot less obvious what is going on, and you can easily crash your app if the slightest thing goes wrong.
In immediate mode, the worst case to happen is that some of your objects are not drawn :)

If you look at almost all of the well-known demo-tutorials that are available on the net, you will find that they are coded in immediate mode. It is very well possible to render a 129x129 height map (16k vertices) with dual texturing at 40-60 fps in immediate mode, as has been shown several times. 16k vertices is plenty.
Sure enough, you burn a lot of CPU in API calls, but so what. For what it is used, it is good enough.

Michael:

--- Quote from: Vampyre_Dark on May 04, 2006, 03:04:52 pm ---
--- Quote from: Michael on May 04, 2006, 02:53:19 pm ---Look interesting :).

I also find this one not bad at all:

http://www.sgi.com/tech/stl/

Best wishes,
Michael


--- End quote ---
:lol:
I like the one I was using because it was quicker to find the functions I was looking up when I was using vectors for the first time a few months ago.  :lol:

--- End quote ---

When I have begun with STL time ago for my project, I used the MSDN for quick access to list functions and examples. Later, I begin to use more and more the www.sgi.com/tech/stl/, because it gives useful explanations of the STL containers. Anyway, I still use occasionally MSDN or a google found website for easy access to the list of functions :).
 
Best wishes,
Michael

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version