Archived

This topic is now archived and is closed to further replies.

zip_256

DirectX or OpenGL???

Recommended Posts

Hello everyone. I am a somewhat new programmer to the Windows environment, I''ve played around in DOS for years, and I was wondering what would be best to learn for game programming, DirectX or OpenGL. Which is easiest to learn? Which one is most powerful? I know that DX only works in a Windows environment, but how adaptable is OpenGL? Would it be incredibly hard to learn both or should I just focus on getting good at one? I want to eventually work my way up to 3D games; I know that DX has D3D that makes 3D games somewhat more simple, but does OpenGL have any type of 3D acceleration/support? I know basically what DX is capable of, but what all can OpenGL do? Thanks for your advice in advance!

Share this post


Link to post
Share on other sites
umm... OpenGL == DirectX, please don''t ask for any more details. whatever u can do in DX, u can do in OpenGL. etc. both are the same, support same cards (only OGL goes further than just Windows), etc.

so YOU pick yourself. =\

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01 - getting started w/ OpenGL

whoever''s a DX person, give him a beginner DX tutorial so that he could choose between the two.

/me hide under a flame resistant rock.

---
shurcool
wwdev

Share this post


Link to post
Share on other sites
quote:
Original post by Ekim_Gram
*Puts on fire proof suit*



There's no town drunk here, we all take turns.
Velocity Gaming Force


lol, Yea this is the mother of flame wars...

The quick answer for this would be just choose between the one you feel most confortable with, the answer to your question is in this site(I believe it's in the FAQs section not sure though). You can make a search on the forum this question comes up all the time so a lot will come up...

[edited by - FtMonkey on July 27, 2003 11:41:13 PM]

Share this post


Link to post
Share on other sites
I see that the debate is a delicate topic, lol. I am reading the artical that Promit posted and it is very. Sorry for clouding the forum with this topic Thanks for your quick replies though!

-zip

Share this post


Link to post
Share on other sites
OpenGL == Cross Platform
DirectX == Window$

OpenGL == C
DirectX == C++

Make your choice. Personally I think OpenGL is the best choice simply because it is cross-platform.

Share this post


Link to post
Share on other sites
I think that I am going to go with OpenGL simply because all of the code I have saw that uses it seems less complicated and nehe''s tutorials seem promising. One last question though, what do you use for your sound and input if you use OpenGL since it is only a graphics library? Thanks for all of your advice!

Share this post


Link to post
Share on other sites
There''s a lot of libraries out there for sound you can even combine OpenGL with DirectX...For input if you don''t want to get too complicated for now you can use NeHe''s tutorials he has a pretty nice method using windows.

Share this post


Link to post
Share on other sites
quote:
Original post by shurcool
umm... OpenGL == DirectX, please don''t ask for any more details.


This is bullshit, OpenGL == Direct3D .


quote:
Original post by zip_256
Hello everyone. I am a somewhat new programmer to the Windows environment, I''ve played around in DOS for years, and I was wondering what would be best to learn for game programming, DirectX or OpenGL. Which is easiest to learn? Which one is most powerful? I know that DX only works in a Windows environment, but how adaptable is OpenGL? Would it be incredibly hard to learn both or should I just focus on getting good at one? I want to eventually work my way up to 3D games; I know that DX has D3D that makes 3D games somewhat more simple, but does OpenGL have any type of 3D acceleration/support? I know basically what DX is capable of, but what all can OpenGL do? Thanks for your advice in advance!


OpenGL is the "3D acceleration" like Direct3D. Both support nearly the same features, but the main differences are that OpenGL is cross-platform while DirectX is only Micro$oft Win32 or XBox, and you don''t need C++ for OpenGL, although you can of course still use C++ with OpenGL programs. DirectX is a bit harder but learning both isn''t a problem.
You can do the same with both, and neither is faster but keep in mind that a 3D game is much more than D3D/OpenGL calls...

"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

Share this post


Link to post
Share on other sites
quote:
Original post by zip_256
I think that I am going to go with OpenGL simply because all of the code I have saw that uses it seems less complicated and nehe''s tutorials seem promising. One last question though, what do you use for your sound and input if you use OpenGL since it is only a graphics library? Thanks for all of your advice!


You can use SDL (my favourite), plain old win32, or even DirectX. Don''t try using D3D and OpenGL simultaneously, obviously, but DirectInput/Sound/Play/etc get along with OpenGL just dandy.


I''m hip because I say "M$" instead of "MS".

Share this post


Link to post
Share on other sites
quote:
Original post by zip_256
I think that I am going to go with OpenGL simply because all of the code I have saw that uses it seems less complicated and nehe''s tutorials seem promising. One last question though, what do you use for your sound and input if you use OpenGL since it is only a graphics library? Thanks for all of your advice!
SDL provides pretty much all the functions that OpenGL doesn''t, it simplifies certain aspects of OpenGL (such as getting your initial window and rendering context set up) and it''s cross-platform. You can download it at http://www.libsdl.org. There''s a few tutorials on the page, but I don''t know how good they are. I learned from a dead tree book myself.

Share this post


Link to post
Share on other sites
I''ve been thinking about this myself...I chose OpenGL. Hehe well...Thanks to NeHe''s site . Not many demos out there on DirectX. NeHe has a nice collection and from what I see there makes me wanna learn OpenGL even more .

Although I''ve heard DirectX is more advanced...

Share this post


Link to post
Share on other sites
But since you can "mix" them...OpenGL and DirectX are mainly equal. I''m really stuck with OpenGL since Dev-C++ can compile it. I don''t have MSVC++ so really I can''t use DirectX right now...

Share this post


Link to post
Share on other sites
quote:

... OpenGL since Dev-C++ ...



ahem, there are libs for mingw32 dx8.1 and 9.

* can''t believe I got involved with this thread, and can''t believe even more it''s still open *

Share this post


Link to post
Share on other sites
quote:
Original post by neurokaotix
Why do you have to choose? Be a pimp like me and use both. Abstract that ish for API independence bitch




I am doing exactly this right at the moment and its quite cool.

Nevertheless IMHO OpenGL is one hugh mess of an API :D It's C and because of this does not know about namespaces and such. Because of this, the naming convention is... well... ridiculous. IMO messing with function ptrs is not the modern way of building extensible software. Furthermore you have to implement many things 2, 3 or more times depening on which extension to use. I think an API should hide this hardware dependent stuff. Direct3D is sweet COM - once you learned it you'll love it. Hey, but that's just one dumb opinion - so choose what you want and stop making me writing to such a superfluous thread :D

Stick to what you like!

Regards, VizOne

[edited by - VizOne on July 28, 2003 7:31:54 PM]

Share this post


Link to post
Share on other sites
OpenGL is a little easier to start with, but after a certain point it starts to feel like the java of graphics api: which version am I using, anyway? 1.1? 1.2? Both? Hmm...

Share this post


Link to post
Share on other sites