DirectX and OpenGL - Comparison between
Hi, can anyone point me at a comparison of OpenGL and DirectX at both a high level and also a detailed level?
: Hi, can anyone point me at a comparison of OpenGL and DirectX at both a high level and also a detailed level?
in short, both OpenGL and Direct3D are good
however, Direct3D is a bit better (and faster) than OpenGL
the catch here is that Direct3D is for Windows only (XBox is another story that uses DirectX too) and OpenGL is available for all other platforms (exept consoles, but i think you can use OpenGL in PS2)
by the way, DirectX is a collection of all Direct* libraries (at least before DirectX 9c)
Direct3D is one of them and it is the graphics library (DirectDraw is not supported anymore, it is included inside Direct3D since DirectX8. however, you still can program and run DirectDraw programs even on DirectX 9c)
oh, and DirectX uses COM (written in C++) and OpenGL was written in C.
you can also use OpenGL in DOS (unofficial support) by using Mesa (instead of the original OpenGL library)
OpenGL is for graphic cards that support OpenGL (you dont have to worry about it today), and i think Direct3D can be used on every graphic card that can handle the requird thingies.
personality i like OpenGL more than Direct3D, easier for me.
but best to know is to look at examples of both libraries and choose. (see CodeSamples website)
: however, Direct3D is a bit better (and faster) than OpenGL
Can anyone prove this ? Baseless assumption.
: : however, Direct3D is a bit better (and faster) than OpenGL
: Can anyone prove this ? Baseless assumption.
better isnt really a reason to use d3d (maybe), its just that d3dx support images loading (and saving) and you can load .X models (which designed for Direct3D, i think you can also save .X models). but i heard they are slow, i dont know if they are slow with the optimization function.
and there are also math functions, which are not a reason to use d3d since all these functions can be found online (at least what you'll need as a beginner)
there are more functions in d3dx (like fonts), you can find them in MSDN
something i hate the most in DirectX is its syntax. every d3dx starts at D3DX... and every d3d starts at D3D...
the 3 key is far away from both X and D in the keyboard.
and i remember that i heard d3d is faster a realy bit (1-2 fps?).
but i read now from the net- its up to the graphic card. some will run faster in d3d and some in ogl. (and some article says that both speeds are the same if i understand it.)
sorry, the proof was that my computer run d3d much faster than ogl (before i downloaded directx 9, my card not support d3d 9), but i see its up to the card. my bad.
Fayetteville, NC, USA
: : : however, Direct3D is a bit better (and faster) than OpenGL
: : Can anyone prove this ? Baseless assumption.
Actually GL is faster, by MANY frames, on cards that support GL. You see doing a comparison on a card that is not fully GL compliant (ie: my roommate's 9800XT) is not 100% accurate. We compared using my old GeForce Ti4200 AGP8X 64mb card a while back. The ATI was about 5fps higher than the nVidia in D3D, but when switched to OpenGL, the nVidia was over 20fps faster! Why? The ATI was relying on software fall-backs because it did not have 100% GL-compliance. ATI has never been compliant, and as you should know, OpenGL requires the card/chip manufacturers to go to their specs, while D3D will software-render anything the card does not support. That lowers frames, but it makes D3D much more compatible than GL.
Both APIs are good. If you plan on never allwoing Linux or Mac users to use your game/app, and you don't mind lower frames, D3D is the way to go. If you want to reach our growing Linux and Mac communities, you pretty-much HAVE to use GL. D3D will only run under Win32 and that's a big draw-back.
It looks like you're new here. If you want to get involved, click one of these buttons!
Assembly Code Share
Getting started in assembly
C and C++
C/C++ on Linux/Unix
C/C++ Windows API
C++ Game Development
Delphi and Kylix
Java Server Pages
Access databases and VB
Advance Visual Basic
DirectX Game dev
Newbie Game Programmers
Cooling & Overclocking
Database & SQL
Sound & Music
FreeLance Software City
C# & VB.NET School Support
Join the Team
Comments on this site
New programming languages
Off topic board
Mobile & Wireless
Operating Systems & Platforms
Witsbits Go Cloud
Embedded / RTOS
Windows CE & Pocket PC
Networking And Security
Windows 2003 Server
RUP & UML
Quality & Testing
Active Server Pages
HTML & WEB-Design
Mobile Internet & Messaging
WEB-Services / SOAP
In this Discussion