Direct3D as opposed to OpenGL

Started by
18 comments, last by jtecin 23 years, 9 months ago
If you have some really complex and new 3d techniques you can''t use them with OpenGL or D3D. You should write your own software engine. Then if you want to give it hardware acceleration as an option, choose one or the other. However, to do input and sound you will need to learn some directX, and D3D blends in with them, but OGL doesn''t. D3DX is quite a good utility library, and makes D3D much easier than it used to be.
Advertisement
I''ll agree with that last part of that last post. D3D used to be HELL to use. Actually, Brian Hook titled his D3D tutorial "The Hell of Direct 3D". That was DX 3.0 though, and things have changed quite a bit. Still, upon hearing anything that remotely sounds like "execute buffer" I run and hide.

-BacksideSnap-
WitchLord,
Here''s my two cents about questions like this one.
Since you are the moderator, the voice of reason, and have your own web site with ever informative articles, I say merge them.

What I mean is this. When ever questions like this (ones that get asked about once a week) start, do the following.

1) Create a few ultra comprehensive articles about the subject.
This is a one time effort. Others might offer suggestions/changes to the documents via this forum.

2) Post a link to the document within a response.
Others can also post a link to the document.

3) Close the post.

After the document is created (in this case OpenGL vs. D3D) the process will be very simple.
From then on, you won''t have to spend much time at all on these continual postings.

Just my $.02

Very good suggestion, it was actually this very reason why I started writing my tutorials. However, I feel that I''m not experienced enough with OpenGL that I''m able to do a just comparison between OGL and D3D, so I hesitate to write such an article.

- WitchLord

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Hey Witchlord don´t be too hard with these people.Why do you censor their posts?I personally don´t want to take part again in such a fu(king flame-war but I think you have two options:
1.Close the thread!
2.Let it go how it goes,without censorship!

I personally am for 2., ´cause it´s always funny to read these post and nobody takes harm from it if he doesn´t participate in the thread!AND sometimes different opinions HAVE to be discussed(although they have been discussed hundreds of housands of times before on this topic....)

Greets,XBTC!
1)What are the main differences?
OpenGL is rather crap in software mode, while directx has very good software emulation. OpenGL can produce nicer results in 3D, but DirectX has better 2D support (DirectDraw)

2)Which one is supported by more graphics cards?
DirectX. Only the newer graphics cards like the GeForce1 and 2 have full OpenGL support

3)Which is easier to use for simple 3d game? (sort of an oxymoron)
2D: DirectX (DirectDraw)
3D: OpenGL (less code required)

4)Which is easier to use for more advanced 3d game?
2D: DirectDraw
3D: Either - DX and D3D inparticular has caught up with some of OGL''s advanced features, such as stenciling, but lots of code is required. With OpenGL it''s just straight-forward function calls.

5)Which allows for the most freedom and functionality?
I have to say OpenGL in this one, as it''s so customisable and easy to get to grips with. Also, GLUT (GL Utility Toolkit) allows you to create OpenGL apps without worrying about loads of windows code (WINPROC, WINMAIN, etc) - it does all that bit for you.

6)If you were to talk to the programmers on all the newest games, which API would that say they are using?
I would say OpenGL, mainly because I only take notice about what goes on in the OGL world. There are probably hundreds of developers used DX, but that doesn''t bother me .

If you a beginner, then do a little experimenting with both. If you want to get down and achieve some stunning results instantly, then use OGL. If you want lots of spegetii code and stunning results, use DirectX.

You also have to think about the type of game you''re doing. If it needs graphics like QuakeIII then use OpenGL as some of the stuff still isn''t in DX. If you want graphics lile QuakeII, use DX or OpenGL.

That''s my one cence (not two, most of my comments arn''t worth that much)

MENTAL
The graphics in EverQuest are rendered using D3D7...
I've actually never played quake I, II, or III (I can however beat DOOM2 with my eyes closed) so I don't know how they compare... The eye candy in Everquest is quite nice, though there isn't anything spectacular... but that probably has very little to do with the API's used.

From what i gather thus far, OpenGL is a much more mature API than DirectX, though I do not know DirectX well. I haven't ever used Glide or Genesis.

I was rather dissappointed at first thinking that I had to write my own matrix mult & stack & such - I just discover d3dx though


Edited by - Magmai Kai Holmlor on July 3, 2000 3:38:42 AM

Edited by - Magmai Kai Holmlor on July 3, 2000 3:44:28 AM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
WitchLord, don''t be afraid of making a mistake in the writing of such an article.

It will be a living document.
Anything that is wrong, will eventually be corrected by someone on this board.
Even if your first attempt is only 80 percent truth, that is much better than the 60 percent misinformation that these posts have a tendency to create.

A person that is new to directx or opengl, will have a source of info that is unbiased(very important.) It will help them make a choice (even if the choice is to use both) based upon mostly factual information.
So to sumerise, you can give a first version of a document that is mostly factual and is unbiased. Others can offer suggestions on ways to make the document better. Time well spent now, saves much time later (kind of like a good design before the programming effort!)
Magmai Kai Holmlor:

"The graphics in EverQuest are rendered using D3D7..."

I don''t believe this to be true. Direct3d rendering is SUPPORTED, but the origional design was for OpenGL. Try installing OGL Drivers for your video card and change the device in EQ to OpenGL. It looks a bit smoother and nicer (they implimented a few more lighting/texturing features for GL than they did for DX).

Note, however, that both are supported fairly interchangably. This is (sadly, some may say) the current trend of 3d graphics: Two separate architectures, Direct3D and OpenGL, both with mostly the same features at a high level of implimentation, being implimented and used interchangably. Doubles the programmers work-load, to a small degree, but hey, it works.

I have dabbled in both DirectX and OpenGL, and found them both to be a little intimidating at first, but pretty much equally viable. The vector-sum of both systems is about the same. However, while OpenGL is a bit easier than DirectX to use in the general 3d category (at least, to start out), it should be noted that some people (at least myself, so far) might have a little trouble getting OGL, specifically Windows OpenGL (wgl or "Wiggle") impliment as cleanly in a windows environment.

In the end, it is the programmers choice. If you plan on getting a job in the industry, my only advice would be this: Learn both =)

(How''s that for conciliatory? hehe )


-- Nathan Hoobler
-- Nathan Hoobler
I have seen some requests for a document that compares OpenGL to Direct3D but I have decided that I will not write any document like that. I would rather spend my time programming or write tutorials. However if someone else feels like doing it I will gladly help by giving my "expert" opinions on Direct3D. I will also give a link to the document in the forum FAQ.



- WitchLord

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement