Jump to content

  • Log In with Google      Sign In   
  • Create Account

OpenGL Vs. DirectX... Which is better?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 AcidJazz   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 November 1999 - 04:18 AM

What are the differences between the 2? What can you do with OpenGL that you cannot do with DirectX? And vice versa?

Sponsor:

#2 NuFAN   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 October 1999 - 12:49 PM

Both are kewl API's. If you want to write portable code, use OpenGL, if you wanna write for Win9x systems, use DirectX. That's it. (IMO)

CU

------------------
Skullpture Entertainment
#40842461


#3 Zenroth   Members   -  Reputation: 127

Like
Likes
Like

Posted 24 October 1999 - 01:06 PM

Not quite sure because i havnt looked into opengl much latly. But doesnt opengl not have code for input,networking,and sound?

#4 menasius   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 October 1999 - 01:35 PM

Well first we have to clarify that OpenGL is not the same type of API as DirectX. It is strictly graphics, whereas DirectX can handle sound networking input and graphics. So the question really is OpenGL vs DirectDraw/3d.

Here is my 2 cents on it all (no actual cash value)
DirectDraw/3d (on its simplest level) sets up an environment that is similar to what VGA programming used to be. You can gain (pseudo)direct access to video memory so that you can manipulate it directly. This is the only thing that I see as a major difference because past that both DirectDraw/3d and OpenGL contain transfomration and rasterization functions.

OpenGL is (IMO) more clean and easier to learn.

Both API's are acclerated to the point that the real 'benchmark' relies on the job programming. Which is to say don't pick one or the other because you've heard one is faster (that point can be debated forever).

Also relaize that OpenGL can be used wih DirectAccess/input/sound so they really shouldn't be a factor.

essentially you have to use both and pick your preference.

[This message has been edited by menasius (edited October 24, 1999).]


#5 Aldacron   GDNet+   -  Reputation: 3182

Like
Likes
Like

Posted 24 October 1999 - 05:15 PM

The other thing to keep in mind is that the level of support for OpenGL by Graphics card manufacturers is lacking. Many cards only handle a small subset of the API (mini-drivers), while some don't support it at all.

Direct3D on the other hand, is supported by nearly every card on the market. Some capabilities might not be, but what the hardware doesn't handle DirectX hardware emulation does.

Also, the implementation of OpenGL you choose is a factor. For example, they say the windows implementation is quite slow.

I've not had much experience with it, but the little bit of research I've done has led me to the descision that now is not the time to use OpenGL exclusively. Not for games anyway. It would be great for modelers (I believe 3DS Max uses it).

Word is, however, that things are looking up and more hardware support for OpenGL will increase in the near future.

One more thing. As far as the learning curve goes, the new Direct3DX utility library that ships with the DirectX 7 seems to simplify D3D. Much easier now than using Immediate (or even retained) mode. And a new D3D interface called Fahrenheit is on the horizon (last I heard).

[This message has been edited by Aldacron (edited October 24, 1999).]


#6 Matt   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 October 1999 - 07:25 PM

Really you should compare Direct3D and OpenGL.

Each has it's advantages and disadvantages. Here is a breakdown of them.

OpenGL - Designed by a committee, inclusion of new features to the common API is slow, but deliberate, so features are fairly logical and clean, they just take awhile to be included.

However, OpenGL supports extensions that can expose additional features, but of course you have to code the usage of extensions into your game/program.

Assuming you are using a full ICD, you cannot determine what is supported by the hardware, and what will be emulated. Also many cards have lackluster drivers that do not support most features in a good way.

Direct3D - Rapidly adds new and upcoming features, which is good, but the API itself has gone through a number of overhauls.

Drivers for most cards are relatively decent, and you can tell through caps bits what a card supports, but to some, the "caps" system is a bit much.

OpenGL tends to be easier to use, but in my opinion isn't that great for games, for some of the reasons I mentioned above, and also one of OpenGLs main strengths is that it is portable, but considering a game written for Win32 will almost by default use nearly every other component of DirectX, the game itself really isn't portable.


#7 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 24 October 1999 - 10:14 PM

Well, the OpenGL implementation for some cards might be sluggish (older cards don't even have a driver), but there are some tools that can help your gamer. Scitech has a library that translates OpenGL to DirectX, and there is a freeware version included in the new Mesa 3.1 distribution. That should take care of the compatibility problems. Question is, if these are slow. I didn't try them out, but I have some questions about their speed if they have to translate form API to API to API to hardware.

#8 King   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 October 1999 - 05:47 AM

hahahhahaha

#9 Kyle Radue   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 October 1999 - 01:31 PM

The choice between OpenGL and Direct3D really depends on a large number of factors.

If you are relatively new to programming or graphics programming, then I would OpenGL would be a better choice as it requires minimum code to initialize it and has a much cleaner interface.

If you are familiar with Windows programming then learning D3D will not be as big of a challenge.

As Menasius pointed out, speed between them is not a reason to choose one over the other.

OpenGL drivers for video cards are currently much better than the previous posts suggest. Unless you haven't purchased a new video card in the past 18 months your card will have an OpenGL ICD. 3dfx cards are the exception, but even they support a very large subset of OpenGL (enough to run Q3A) and this encompasses nearly everything a game programmer would need (especially a novice one).

Direct3D is just as robust as OpenGL is, but it will take substantially more effort to get up and running.

This is turning into a long post so I'll just add one more point. This is the time when OpenGL is a viable solution as the only 3D API for a game as Q3A, Diablo II, and Halo will all have OpenGL versions but not Direct3D.

I didn't mean this to turn into a pro-OpenGL message, but it did help remind me why I use OpenGL instead of D3D for my personal projects.



#10 kj   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 November 1999 - 04:18 AM

I would look at the way you init OpenGL and Direct3D as an example of which is better. With D3D, you write a bunch of potentially buggy enumeration functions, and then create all of these "device objects". It took me quite a while to learn how to do this and it still does not always do what I think it will.
With OpenGL, you call GLInit(), and forget about it.
OpenGL may not be inherently faster, but in everyday use, the time you save lets you do alot more optimization, so your code will probably be faster.
(not to mention smaller, easier to read, more stable, more portable...)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS