Jump to content


what do you recommend?


50 replies to this topic

Poll: Which API do you recommend me to use? (1 member(s) have cast votes)

Which API do you recommend me to use?

  1. OpenGL (13 votes [72.22%] - View)

    Percentage of vote: 72.22%

  2. DirectX (4 votes [22.22%] - View)

    Percentage of vote: 22.22%

  3. Other (please specify) (1 votes [5.56%] - View)

    Percentage of vote: 5.56%

Vote Guests cannot vote

#1 ale_socc

    New Member

  • Members
  • Pip
  • 2 posts

Posted 14 February 2003 - 05:08 PM

Hello. I am not sure if I'm at the right place, but this seems to me an excellent forum. Its the best forum I've ever seen. I especially like its features, like the PM, organization, speed, and the calender (although its not used).

My question is, I would like to start learn game/graphics programming, and I don't know which API to use. Should I use DirectX, or OpenGL? Please give me a good and convincing reason to use one API rather than the other.

Thanks


#2 Barbokp69

    New Member

  • Members
  • Pip
  • 2 posts

Posted 14 February 2003 - 05:14 PM

I recommend that you use DirectX since you are aiming to develop a game. DirectX was designed especially for games, whereas, OpenGL was designed for workstations and graphics in general. OpenGL is not optimized for games.

#3 donBerto

    Senior Member

  • Members
  • PipPipPipPip
  • 369 posts

Posted 14 February 2003 - 05:20 PM

I recommend OpenGL. DirectX is not optimized for gaming, it's optimized for [accessing hardware in] Miscrosft OSes. OpenGL on the other hand is cross-platform and will work with all OSes. so instead of limiting your game to just windows-users, you can target MAC users, *nix users, BSD users, etc.
Imagine.

#4 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 14 February 2003 - 06:15 PM

well, I won't vote, but I'll give you my recommendation.

I assume you run windows, if you run anything else there is no option of directx :).

Reasons for OpenGL:
  • If you want to target multiple platforms or think you might move platform yourself

  • You don't like COM

  • You don't like C++, or wish to use C without using those silly vtable things

  • You don't like hungarian notation

  • You happen to like OpenGL better
Reasons for DirectX:
  • if you don't really care about other platforms

  • You like COM

  • You like C++

  • You like hungarian notation

  • You happen to like DirectX better

  • Your graphics card supports DX better than OGL
As you can see, most of them are opinion. I recommend you try out both, and see which one fits your needs best. If you have time/patience, learn both. It will be good if you want to get a job in the industry.

btw, generally these posts (because there is no definate one that is *better* at everything for everyone) cause flame wars. Tread carefully.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#5 abcd_z

    New Member

  • Members
  • Pip
  • 6 posts

Posted 14 February 2003 - 06:17 PM

One thing which proves that DirectX is better is that ALL professional and commercial games (95% to be more accurate) use DirectX to make their games. They never use OpenGL.

#6 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 14 February 2003 - 06:32 PM

I don't think that proves directx is better anymore than the 90% windows users proves windows is better or the number of AOL subscribers proves that they are superior ;). I guess that the reason for the games using directx is simply compatibility. Most people use windows, and most have good directx drivers.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#7 donBerto

    Senior Member

  • Members
  • PipPipPipPip
  • 369 posts

Posted 14 February 2003 - 06:35 PM

abcd_z said:

One thing which proves that DirectX is better is that ALL professional and commercial games (95% to be more accurate) use DirectX to make their games. They never use OpenGL.

that is a false assertion. many of the industry uses DirectX because most of the population uses windows. and believe me, games that only use directx aren't as popular. i haven't come across a game that used only directx. I have, however, came across games that only had opengl, mainly because it's cross-platform. take quake3arena for example.
Imagine.

#8 void

    New Member

  • Members
  • PipPip
  • 22 posts

Posted 15 February 2003 - 05:29 AM

saying that DX is better because more games use it is stupid. For example, the following TOP games all use OpenGL:

1. All of the ID games: GLQuake, Quake2, Quake3, and soon to be Doom3 + all Games based on the ID Engines (a shitload of them)
2. Bioware games such as Baldurs Gate2, Icewind Dale2, and Neverwinter Nights all use OpenGL.
3. Warcraft 3 uses OpenGL (it is done through an abstraction layer, WC3 was written for BOTh DX and OGL).
4. Diablo2 uses OpenGL.
5. All Unreal Games and games based on those engines use OpenGL (same as WC3 an abstraction layer was written, the render code was written for i think 3 APIs.

There are many many other games, but those above are TOP games which i could think of. Also, consider just how many games there are based on the Quake engines and on the Unrel engine.

It is true that OpenGL wasnt designed for games, it was deisgned for encellent graphics, and it doesn this very well. Also, it gives you the flexibility to use any other library for other things such as sound and netweorking, whereas DX basically foces you to use DX exclusively.

#9 Dia

    DevMaster Staff

  • Administrators
  • 1097 posts

Posted 15 February 2003 - 07:46 AM

One thing I dislike about directx is the fact that it changes drastically from release to release, making it practically difficult to update a game using an older version of DirectX. That is, if you have made a program/game in DirectX 7.0 and then you would like to use DirectX 9.0, it would be headache and a nightmare to convert. In other words, you're code for DirectX is in reality is only compatible for a couple of years only. Your code becomes quickly outdated and cannot compile anymore without the old libraries. OpenGL on the other hand is consistent and has used the same API since it was developed in 1991, which answers the question on why you can find lots of references, tutorials and young developers loving it. Even OpenGL 2.0 (whenever it will be released) will be compatible with older versions of OpenGL.

However, if one woud have to speak in terms of power and performance, yes DirectX (especially now) is powerful and there is no difference in performance between OpenGL & DirectX. Nowadays, performance doesn't depend API anymore, but depends on hardware and drivers.

In industry, you MUST know both to be considered as standard. Knowing one and not the other is not that attractive to potential employers.

#10 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 15 February 2003 - 09:01 AM

void: To be fair, DirectX doesn't force you to use DX for everything. I quite happily wrote an OpenGL demo which used DirectSound.

apex: Although porting DirectX 7 games to DirectX 9 is a headache, you'll still be able to run the DirectX 7 game in DirectX 9. Even if you have DirectX 9, you can run games written in DirectX 3

That's how MS works, they break backwards compatibility, but include the entire old release with the current. That's why DirectX is so bloated. OpenGL doesn't, because as they keep backwards compatibility OpenGL 1.4 is OpenGL 1.3 with a bit more, and 1.3 is 1.2 with a bit more, etc.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#11 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 15 February 2003 - 12:09 PM

hm.. dx8 to dx9 is no problem to convert really.. mainly adds features, only some stuff changed. but dx8 was a full redesign of the dx api, because microsoft realised dx is messy, not structured, and old style done. dx8 is a great construct, but logically, a full redesign forces to recode old apps if you want to convert to the new versions. the same is currently in plans with opengl with gl2.0, and every extension forces you to recode paths. espencially vendorspecific extensions. take gl code from me, one year old. not runable anymore because i used an nvidia ext. thats why i only use arb exts from now on..

and gl is bloated as well btw.. its just hw vendors "forget" to implement quite a bit of it, because its not doable in (gamers) hw. but gl is big.. ever looked at the specs? :D (okay, nvidia extension specs are bigger than the gl specs.. hehe :D )

anyways. i don't vote. i know both, and i can suggest both. i prefer personally opengl, espencially in small scale stuff. but both are great currently, both have great features, and are easy to use. if you code in windows, you can choose from both.

actually, dx is much more structured than gl.. code gets quite a bunch cleaner. on the other side, gl code is more "simple" most the time. shorter, and more easy to follow. depends on what you look at..

and currently the ARB is working on a general cleanup of gl.. hehe
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#12 donBerto

    Senior Member

  • Members
  • PipPipPipPip
  • 369 posts

Posted 15 February 2003 - 03:40 PM

baldurk said:

void: To be fair, DirectX doesn't force you to use DX for everything. I quite happily wrote an OpenGL demo which used DirectSound.
i don't think he meant that it forces someone to use DirectX for everything, but speaking with efficiency in mind, if you use DirectX for your graphics API, you might as well use it for input and sound because it's all in the library, instead of using another API, increasing the size of the executable.

i'm not sure if there are ways to 'cut the fat out' -- if you can just use DirectSound without Directi3D or what have you.

can you? enlighten me! :yes:
Imagine.

#13 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 15 February 2003 - 03:50 PM

I don't think so.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#14 WiseElben

    New Member

  • Members
  • PipPip
  • 10 posts

Posted 16 February 2003 - 09:57 PM

You can use DirectX and OpenGL together, just not Direct3d and OpenGL together. :D
Visit my game programming site at <a href='http://wiseelben.com' target='_blank'>wiseelben.com</a>

#15 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 17 February 2003 - 05:39 PM

yes, each component lets itself get initialised individually.

so its

OpenGL or Direct3D
OpenAL or DirectSound
OpenNL or DirectPlay

etc.. sure, there are even more libraries for nongraphics stuff.. for sound for example the bass.dll or others, too.. for network you can use {your operating system here} base network libs. (winsock in my case). etc..

you can even have opengl and direct3d. just not in the same window:D
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#16 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 17 February 2003 - 06:12 PM

Well, you could have D3D in the same window, both in different sections.

Now THAT would be interesting :)
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#17 donBerto

    Senior Member

  • Members
  • PipPipPipPip
  • 369 posts

Posted 17 February 2003 - 06:16 PM

question:

isn't Direct3D, DirectSound, DirectInput, DirectPlay, DirectWhatever all bundled into DirectX?

OpenGL is NOT affiliated with OpenAL nor OpenML
they merely have the same interface...
Imagine.

#18 void

    New Member

  • Members
  • PipPip
  • 22 posts

Posted 18 February 2003 - 04:58 AM

DirectX is the general name given to the colleciton of APIs such as dsound and d3d, it encompasses all the libraries that start with Direct... OpenML is an initiative by a group of companies including big names such as ATi, 3DLabs, and many others, to create a system very much like DirectX, which will include OpenGL, openAL, and other APIs for madia playback and possibly input, i forget.
OpenGL cannot be compared to DirectX since its a graphics only library, but usually on these kind of forums when people say DirectX they really mean Direct3D...

On another note, here is a reason to use OpenGL: John Carmack uses it, and he is a GOD!!! :-) Dont you want to be a god like him? If you do, then use OpenGL...

#19 donBerto

    Senior Member

  • Members
  • PipPipPipPip
  • 369 posts

Posted 18 February 2003 - 11:06 AM

i'm trying to be like john carmack...
Imagine.

#20 DarkLight

    Member

  • Members
  • PipPip
  • 57 posts

Posted 18 February 2003 - 08:56 PM

First of all, unlike DirectX, OpenGL if free, open-source development
Second: it is easier to learn (at least because of the less functions)
Third: The best games use OpenGL
Forth: Linux becomes more and more popular, but DirectX is only for Windows
Fifth: There are many OpenGL related libraries like GLUT and GLAUX for examle
Sixth: There are many Open-source OpenGL applications (including games)
<a href='http://www.kaldata.net' target='_blank'>kaldata.net - IT News</a>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users