Speed difference between d3d and ogl

Started by
4 comments, last by Eriond 20 years, 1 month ago
A person on another forum insists that ogl is about 20% faster than d3d. I''m quite sure that is not the case. Can anyone post some benchmarks or something to convince him I have searched but didn''t find anything useful.
Advertisement
For any decent hardware the difference is negligible to zero. There is no fundamental reason why one should be faster than the other.
My stuff.Shameless promotion: FreePop: The GPL god-sim.
doc is completely right, try this, make him tell you WHY its faster (and watch him go "uuhhhhh.....")
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."
A few things that may impact performance:

Depending on hardware, switching vertex buffers in DX may be significantly more expensive than calling VertexPointer() in OpenGL.

DirectX doesn''t support quads, so if you use a lot of quads, you''ll find yourself sending 50% more vertex indices to DirectX than to OpenGL.

OpenGL doesn''t have good, well implemented support for rendertargets that are not the framebuffer; DirectX has a much better mechanism for this. If you do a lot of offscreen rendering, OpenGL may be slower.

DirectX doesn''t really have an immediate mode. If you use DrawPrimitivesUP(), it''ll usually be quite slow. If you use an immediate mode model, DirectX may run slower.

Anyway, give me $1,000 and tell me which API you want to be the fastest, and I will write the benchmark that "proves" that it is :-)
enum Bool { True, False, FileNotFound };
Remember a lot of old games were programmed with ogl in mind, and a lot of cards didn''t match ogl performance with dx performance - take HL for example, dx perfomance is considerably worse than ogl peformance on most low end to moderate hardware
quote:Original post by hplus0603


OpenGL doesn''t have good, well implemented support for rendertargets that are not the framebuffer; DirectX has a much better mechanism for this. If you do a lot of offscreen rendering, OpenGL may be slower.



There is RenderToTexture extension and P buffers as well. Also OpenGL will have PBOs soon, which are like VBOs only they are used for pixels.

This topic is closed to new replies.

Advertisement