Confused(Opengl or DirectX)

Started by
43 comments, last by Buzz82 22 years, 4 months ago
Just for the record:
in the serious sam 2 demo you can switch between D3D and OpenGL, and they look just the same (same nice gfx).
Advertisement
comparing the look of the graphics is an exercise in ignorance. Both APIs are access points to the abilities of the card. Therefore, both APIs provide equivalently the same quality of service modulo driver issues and very, very specific features. If a game company codes towards one API more poorly than the other this has nothing to do with the API. Many of the responses here are silly an uninformed.

Feature set - for a beginner they are exactly the same. There are feature differences, but it will be awhile before you see them.

Ease of use/learning. I would say OpenGL, but DX8 comes a close second. My advice is to learn whichever "feels" better to you. Switching is very easy once you know the basics.

Hardware support - Direct3D wins in terms of consistency, but OpenGL is pretty good.

Multiplatform - Do you develop for multiple platforms? Are you ever going to run anything on another platform? If the answer is no then the point is moot. If you are a linux programmer, then there''s no argument and I''m assuming you''d never ask the question. If you are a windows programmer who thinks that one day you *might* want to use linux, you could still use DirectX and switch once you need to. Switching is easy.

Bottom line, look at both and see which one feels better.
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
The fact that D3D doesn''t work with NT, and OpenGL does.. should tell you a little something about which is more Stable :o) (professional rendering software typically uses OpenGL). OpenGL is on version 1.1 I beleive.. DirectX is on version.. 8.1a.. should also tell you something about stability, and how many tries they needed to even come close to being as good as OpenGL is. With D3D you have to wait for the new version to support "new" features.. OpenGL just has extensions you use, makes it simpler to work on things without waiting for a new (buggy) beta version.

OpenGL - Simple to setup and program with
D3D - Used to be hard, but is getting simpler... but still not as easy

Graphics quality of the 2 API''s IS IDENTICAL as this is based on Hardware Limitations... either one gives you access, it''s just whether the developer uses it (correctly). I prefer OpenGL simply because it''s simple for me to write programs and get the most out of. D3D is more difficult to achieve the same results (although, the same results *can* be gotten).

Billy
Who cares about NT ????
-------------Ban KalvinB !
quote:Original post by Buzz82
i have decided to start games programming .I have 1 year experience of C and have programmed simple games like paranoid and nibbles and a drawing utility similar to MS paint and now a days i am learning C++, but i am a little confused over the choice of an API.I don''t know which one is better opengl or directx.I started to learn opengl 1 month ago but now i am stuck because many said that as far as programming games for windows is concerned u should use directx and some said that there is no harm in using opengl as it is compatible to many platforms and is as good as directx for windows game programming.Please help me as i am really very confused about this matter.Please also give me a rough idea on the percentage of commercial games made in opengl and directx.
Reply me keeping in mind that i am a newbee.Also give reasons for your suggestions.I''ll be grateful



First thing to do is search the forum for DX vs OGL threads, you will find a great deal of them and they all answer in the same way...

Try both and take the one you prefer.



"And that''s the bottom line cause I said so!"

Cyberdrek

Resist Windows XP''s Invasive Production Activation Technology!

"gitty up" -- Kramer
/(bb|[^b]{2})/ that is the Question -- ThinkGeek.com
Hash Bang Slash bin Slash Bash -- #!/bin/bash
[Cyberdrek | ]
The API you''re using has no effect whatsoever on the quality of graphics your game will output (maybe if you''re using software rendering, but...) The quality of your graphics code and art, as well as the features and abilities of the graphics card your program is running on make all the difference.
quote:
P.S. The field of view serious sam has is also amazing...D3D has to hide long levels or zones(eq) with the same lame fog effect and just draw the graphics as the player gets closer.
every d3d game ive played that had terrain always hid the far off areas of the level..and no that''s not intended..D3D is not capable of displaying HUGE terrains without having to hide it with fog effects then drawing the graphics into view as needed.


Most games use fog to hide distance. I''ve played Serious Sam (the demo) and thats more indoor / small outdoor areas. Everquest has landscapes (I''ve never played EQ tho, just speculation) and because the should be big, fogging is used so older video cards don''t crawl.

Tribes2 uses both OpenGL and Direct3D but you can argue that T2 sucks ( I won''t, awesome game). Anyways the programmers added huge amounts of fog to most maps making it like flying in peasoup fog in a patch so people got more FPS (this is what you get from people with old video cards ignoring the minimum sys requirments). I must say Tribes2 looks pretty damn nice but the developers said that their OpenGL renderer is better then the Direct3D but that seems to be just from their coding/testing experience. Tribes1 I believe only had OpenGL and software rendering (my jaw dropped when I saw Tribes1 in OGL for the first time compared to software)

Hmm looks like I''m rambling and trolling, sry
||--------------------------||Black Hole Productionshttp://bhp.nydus.netResident expert on stuffmax621@barrysworld.com||--------------------------||
quote:Original post by Anonymous Poster
The fact that D3D doesn't work with NT
Who's developing games for NT?
quote:Original post by Anonymous Poster
should tell you a little something about which is more Stable :o)
"A little" as in "absolutely nothing"?
quote:Original post by Anonymous Poster
(professional rendering software typically uses OpenGL).
True, but that's because graphics workstations typically don't use a Windows OS, and if they did, traditionally they used NT - not sure if they're using 2000 these days. The point is if I'm developing professional rendering software, I know that most of my users have machines that don't support DirectX, so the decision to use OpenGL has nothing to do with whether or not it's more stable than Direct3D.
quote:Original post by Anonymous Poster
OpenGL is on version 1.1 I beleive..
1.3, actually.
quote:Original post by Anonymous Poster
With D3D you have to wait for the new version to support "new" features.. OpenGL just has extensions you use, makes it simpler to work on things without waiting for a new (buggy) beta version.
Two different paradigms, neither of which is inherently superior to the other. Microsoft's approach to a rapidly changing hardware market is to release new versions of their API every year. Although this may mean that you have to wait a while to take advantage of the latest advances, at least when the release comes you'll have a (mostly) standard interface to the hardware. (Also note that the effect of this "lag" is somewhat diminished by the fact that MS works closely with hardware vendors to keep pace with them, and that most developers will delay coding for new hardware features until consumer adoption of the hardware is widespread). OpenGL's approach is to only update the API when there have been major advances to hardware in general, and in the meantime allowing developers to access new advances through extensions, which, because they take a while to standardize (look at the situation with shaders), can lead to some messy special case code. Each paradigm has its pros and cons, so there's no clear winner - it's up to the individual to determine which they like better.

Dave "Myopic Rhino" Astle
Executive Producer and COO, GameDev.net
Game Programmer, Avalanche Software
Author, OpenGL Game Programming

"Withdrawal in disgust is not the same as apathy"
please read the anonymous post that was signed by billy.
More facts that i agree with and prove my point.

I just have one last question cause this topic has become so boring..

Games like halflife, return to castle.. etc use OpenGL and Directsound,directinput etc. why use 2 different APIs for the same game? obviously OpenGL doesnt have dsound or input hence the name OpenGL = Open Graphics Library.

So if Directx is so much better than OpenGL why dont they just use it for the entire game and not just use GL for graphics and Directx for the sound and input?? if d3d IS the much better API it makes no sense why they use it ONLY for the sound/input etc and not for the graphics portion also.

Again i say..tell that to id software ..why bother programming for an API that you can't make games for linux or any other nonwindows OS? choices become limited.

They use Opengl so it can run on NT/XP/2K/95/98/ME/Linux etc and not have to worry about sticking to ONE OS..and also for Alpha which only linux and nt/xp/2k run on...Why? cause it will make them MORE MONEY..cause NOT EVERYONE RUNS WINDOWS.

But if all of you that are arguing would rather just stick to one api for ONE type of OS only i bet you're the same people that put down microsoft but at the same time you are following their proprietary API like a little monkey.

Whoever is "unsure" about which api to use just look at all the facts..about 4 or more posts here have said that DX is annoying to program for and OpenGL is much easier...OpenGL can be run on any OS and not just x86 based computers..more options are available to you with OGL (for those of you that still don't get it)

So if you really want to make a game wouldnt you use the LESS annoying API to program for and only use DX for the input and sound? JUST like valve, id software etc. have done?


heh not gonna bother reading this section again...So how many of you think VB is a great language to make games with?? hahahaha

BTW NT/XP/2K are all the same OS just in case some of you are morons and don't know and actually think 2k and xp was programmed using win95/98/ME code. So programming opengl under any of those 3 you will know you will get the same stable OS and it will work under all 3...that was a response to the person that said "whos programming for nt??"-everyone that uses xp/2k to make games using opengl or D3D and other types of programs..thats who. Their d3d games wont run on NT4 but will on NT5(Win2k) and NT5.1(XP) so its STILL programming for "NT"














Edited by - myca on January 9, 2002 2:08:33 PM
Since you keep using the fact that id uses OpenGL as the main support for your arguments, let's see what John Carmack has to say about the subject:

quote:Original post by myca
They use Opengl so it can run on NT/XP/2K/95/98/ME/Linux etc and not have to worry about sticking to ONE OS..and also for Alpha which only linux and nt/xp/2k run on...Why? cause it will make them MORE MONEY..cause NOT EVERYONE RUNS WINDOWS.
quote:John Carmack on slashdot
All linux games sales EVER don't add up to one medium selling windows title. We are one of the creditors that aren't likely to see money that Loki owes us, so we have some idea just how grim it is.

That isn't saying that it can't change in the future, or that doing linux ports isn't a Good Thing, but it isn't an economic motivator at the present time.
Also, for his thougths on the current state of OpenGL and Direct3D, read the following: http://slashdot.org/comments.pl?sid=20503&cid=2194363. He's basically saying the same thing that the sane replies to this thread have been saying, which pretty much blows the "id is using OpenGL, so it must be better" argument out of the water.

This topic is closed to new replies.

Advertisement