• Advertisement
Sign in to follow this  

OpenGL vs DirectX10 (xp?)

This topic is 3573 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i'm programming about some time now, and I think is time to learn a graphic api(other than allegro). Should I learn OpenGL or DirectX? DirectX 10 is vista only, but can i program for it on my xp machine? Worth learn DirectX 9? OpenGL can do the same things DirectX 10 can? Which one is easyer to learn, DirectX or OpenGL? Is it easy to setup Code::Blocs(Mingw), to use DirectX or OpenGL? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
vs threads like this are very much frowned on here, and will probably be closed by a moderator. That said, the APIs are pretty much equivalent, so pick the one for the platform(s) you use, and the coding style you prefer.

I would also strongly recommend that you start out with a game engine, rather than starting out with the low level stuff - you might look at Panda3D.

Share this post


Link to post
Share on other sites
I know this question is old, but what I realy wanna know is if i can program to diretcx 10 in a windows xp machine and if worth learn directx 9,although directx 10 is out there.

Share this post


Link to post
Share on other sites
Quote:
Original post by Escarab
if i can program to diretcx 10 in a windows xp machine
Nope, you need Vista
Quote:
Original post by Escarab
if worth learn directx 9,although directx 10 is out there.
A lot of the things you can learn from using an API like DirectX 9 will be useful if/when you make the switch to Direct3D 10

Share this post


Link to post
Share on other sites
You actually can program DX10 on XP, you just won't be able to compile any of it :P. I think it would be worth learning DX9 even though DX10 is becoming more and more common. DX9 is not quite as advanced as DX10 so it may be easier to learn. If this is your first time I think learning the concepts is much more important than learning features. Once you are comfortable with the basics learn some more advanced things about DX9. Then when you are very comfortable with DX9 (and have Vista) you can start DX10. You will learn quickly because you can skip the basics because you already know them. You could jump right into the cool features that solve a lot of the limitations that you will find in DX9.
Hope that helps,
zach297

Share this post


Link to post
Share on other sites
Quote:
Original post by Escarab
Should I learn OpenGL or DirectX?

Learn both?
You probably mean which should you learn first.

Quote:
DirectX 10 is vista only, but can i program for it on my xp machine?

You can write code that uses DX10 but you can't run it on XP.

Quote:
Worth learn DirectX 9?

If you want to use DirectX on XP then DX9 is the way to go.

Quote:
OpenGL can do the same things DirectX 10 can?

Yes.

Quote:
Which one is easyer to learn, DirectX or OpenGL?

On Windows...

OpenGL is easier to start off with. DirectX is easier once you start to do anything non-trivial, that is unless you use a library to manage OpenGL's extensions for you, in which case they're both about equal I'd say.

Quote:
Is it easy to setup Code::Blocs(Mingw), to use DirectX or OpenGL?

I can't speak for Code::Blocks specifically, but in general, yes.
By the by, Visual C++ Express Edition 2008 is free.

Share this post


Link to post
Share on other sites
Quote:
Original post by zach297
You actually can program DX10 on XP, you just won't be able to compile any of it :P.

I believe you can compile it, you just can't run it..

Share this post


Link to post
Share on other sites
Quote:
Original post by dmatter
Quote:
OpenGL can do the same things DirectX 10 can?

Yes.

I don't think OpenGL can do geometry shaders (yet).

Share this post


Link to post
Share on other sites
Quote:
Original post by zach297
Quote:
Original post by dmatter
Quote:
OpenGL can do the same things DirectX 10 can?

Yes.

I don't think OpenGL can do geometry shaders (yet).


OpenGL actually had support for geometry shaders and other SM4 features before DX10 was released. (on nvidia hardware).

as far as SM4 support on AMD/ATI hardware goes all i can see is that Apples radeon drivers for Leopard supports these extensions atleast:
GL_EXT_geometry_shader4
GL_EXT_gpu_shader4
GL_EXT_transform_feedback

AMD/ATI:s windows and GNU/Linux drivers seem to be horribly lacking in OpenGL support however (as usual) so its probably a good idea to use D3D10 if you are targeting Windows (Most windows users who have the hardware for SM4 are running Vista anyway)

Share this post


Link to post
Share on other sites
For starting out I would say OpenGL and check out the nehe tuturials. They will get you going quickly.
Having said that I personally start to lean towards D3D because of the lack of good performance tools for OpenGL. For example pix from Microsoft and more so performance hud from Nvidia are great tools that doesn't support opengl. But they are performance tools so not something you need from the start.

Anyway good luck no matter what route you choose to take.

Share this post


Link to post
Share on other sites
I would suggest OpenGL, if you want SM4.0 features you have them in XP as long as you use GF8 series cards and above, ATI don't who knows when that will happen, maybe GL3.0 will have it for XP. Plus if you ever decide to make apps for other than Windows you guessed it OpenGL, as DX is windows only. IMO why not code for all platforms? If you do it right from the start it's easy to run all platforms.

Share this post


Link to post
Share on other sites
If they stick to the current known plan GL3.0 will not have DX10/SM4.0 features; it is effectively a new API over GL2.0 features which will work on anything from the ATI 9700 to present day hardware (so, DX9 level).

A later update to OpenGL will add SM4.0 support.

Share this post


Link to post
Share on other sites
Quote:
Original post by MARS_999
IMO why not code for all platforms? If you do it right from the start it's easy to run all platforms.


I'm not of the opinion that coding for multiple platforms is trivial, especially for someone who's not experienced in doing so.

Share this post


Link to post
Share on other sites
Whoo! Thast's a lot of answers, thank you all. I think i will stay with OpenGl for a while. Thanks again.

Share this post


Link to post
Share on other sites
Quote:
Original post by MJP
Quote:
Original post by MARS_999
IMO why not code for all platforms? If you do it right from the start it's easy to run all platforms.

I'm not of the opinion that coding for multiple platforms is trivial, especially for someone who's not experienced in doing so.
As long as you use all cross-platform dependencies (OpenGL, SDL, etc.) it really isn't that hard. I even have a mingw cross-compiler setup on my mac to run concurrent builds for Mac, Windows and Linux, all with a single Scons script.

Share this post


Link to post
Share on other sites
Quote:
Original post by swiftcoder
Quote:
Original post by MJP
Quote:
Original post by MARS_999
IMO why not code for all platforms? If you do it right from the start it's easy to run all platforms.

I'm not of the opinion that coding for multiple platforms is trivial, especially for someone who's not experienced in doing so.
As long as you use all cross-platform dependencies (OpenGL, SDL, etc.) it really isn't that hard. I even have a mingw cross-compiler setup on my mac to run concurrent builds for Mac, Windows and Linux, all with a single Scons script.


It's easy to say that when you're not a beginner, as the OP clearly is. Someone just starting out should keep it very simple and just work in one environment, there's already a ton for them to learn.

Even for someone who's experienced with crossplatform work, there's still a ton of gotchas and pitfalls (yes, even if you use crossplatform libraries). A new programmer just shouldn't go there.

On topic: I agree with the opinion that opengl is easier in the beginning, while direct3d is better once you start doing non-trivial work. However both have pros and cons and it's all about personal preference. I myself prefer direct3d, but am eagerly looking forward to trying the new version of opengl.

Share this post


Link to post
Share on other sites
Quote:
Original post by dmatter
Quote:
OpenGL can do the same things DirectX 10 can?

Yes.

No.

OpenGL can render stuff, you have to look elsewhere for sound(fmod), asset loading(and animation)(devil/animadead), input gathering(sfml), math routines(cml) and probably more. OpenGL will never feature theese as it's purpose (same as Direct3d) is to render your data.
OpenGL and Direct3d are more or less equivalent, OpenGl and DirectX are not.

Share this post


Link to post
Share on other sites
Quote:
Original post by sirGustav
Quote:
Original post by dmatter
Quote:
OpenGL can do the same things DirectX 10 can?

Yes.

No.

OpenGL can render stuff, you have to look elsewhere for sound(fmod), asset loading(and animation)(devil/animadead), input gathering(sfml), math routines(cml) and probably more. OpenGL will never feature theese as it's purpose (same as Direct3d) is to render your data.
OpenGL and Direct3d are more or less equivalent, OpenGl and DirectX are not.


I was wondering about this. Didnt they deprecate most of these? Directsound, directmusic, direct input and directplay are all ill advised to be used no? D3dx is a utility library so is technically not part of "DirectX TM". i dont know where xinput falls. So doesnt all this imply that using direct x as a counterpoint to opengl is not so inaccurate these days?

Share this post


Link to post
Share on other sites
Quote:
Original post by Daerax
I was wondering about this. Didnt they deprecate most of these? Directsound, directmusic, direct input and directplay are all ill advised to be used no? D3dx is a utility library so is technically not part of "DirectX TM". i dont know where xinput falls. So doesnt all this imply that using direct x as a counterpoint to opengl is not so inaccurate these days?


DirectSound isn't deprecated. It's very mature and I'm quite sure many developers still use it. I imagine it'll be phased out in the future, in favor of XACT, but I also also imagine it'll be supported for a long time.

DirectInput isn't deprecated, but it's often advised that you not use it, especially for keyboard and mouse input. However, if you want to directly support joysticks and gampads and such, you don't have much choice.

edit - I was wrong, both these are deprecated in DirectX 10. They should always be supported for DirectX 9 though.

DirectPlay has been deprecated for a long time.

Share this post


Link to post
Share on other sites
Quote:
Original post by sirGustav
Quote:
Original post by dmatter
Quote:
OpenGL can do the same things DirectX 10 can?

Yes.

No.

OpenGL can render stuff, you have to look elsewhere for sound(fmod), asset loading(and animation)(devil/animadead), input gathering(sfml), math routines(cml) and probably more. OpenGL will never feature theese as it's purpose (same as Direct3d) is to render your data.
OpenGL and Direct3d are more or less equivalent, OpenGl and DirectX are not.

You're right that saying "D3D10" is technically correct over "DX10", although the two get used fairly synonymously now since there is no other DirectX API up to level 10 other than D3D.

Share this post


Link to post
Share on other sites
DirectSound is replaced by xAudio2 and DirectInput is replaced by xInput. both are included in the DirecX part of msdn, so I would say that it is a part of the direct x. While neither are especially hard with other libraries, it is a cohesive package.
I should probably say that I like OpenGL more so that's what I use, as it mostly comes down to what you like :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement