DirectX vs OpenGL
Started by Overloaded, May 20 2012 11:20 PM
9 replies to this topic
#1
Posted 20 May 2012 - 11:20 PM
Hello. I started learning C++ around one-two months ago, and yesterday I started working with DirectX in C++. From what I understood DirectX is the only way to make programs or games in C++. But I saw some videos that people use OpenGL to make programs/games. I heard that DirectX is only Windows - available, but OpenGL is Cross-Platform. I don't really care about this, because I only want to program in Windows (and maybe in Android). In your opinion what does better work? I'm sorry if I understood wrong, because I'm new to C++ and all these DirectX and OpenGL stuff.
#2
Posted 21 May 2012 - 01:49 AM
DirectX is Microsoft's proprietary API's for all things related to multimedia. Including 3D graphics rendering used in games. It is available only on PC's running windows, and other microsoft things, such as the XBoxes.
OpenGL is just a standard specification of API's for producing 2D and 3D graphics, although, for any platform out there. Inlcuding PC's, Macs, Game consoles, phones, tablets, and embedded computers. (Raspberry Pi)
DirectX is slightly different to OpenGL as it's an API that handles all media functions, such as audio playback, as opposed to OpenGL, which is just for graphics, Requiring you to use something else for audio playback.
I'd recommend OpenGL so that your software can be later ported to other platforms (like a raspberry pi) with minimal effort, But I guess it would require more effort to develop with it than with DirectX. So I guess it's just your choice.
Edit: Oops, Left my previous draft in the post.
OpenGL is just a standard specification of API's for producing 2D and 3D graphics, although, for any platform out there. Inlcuding PC's, Macs, Game consoles, phones, tablets, and embedded computers. (Raspberry Pi)
DirectX is slightly different to OpenGL as it's an API that handles all media functions, such as audio playback, as opposed to OpenGL, which is just for graphics, Requiring you to use something else for audio playback.
I'd recommend OpenGL so that your software can be later ported to other platforms (like a raspberry pi) with minimal effort, But I guess it would require more effort to develop with it than with DirectX. So I guess it's just your choice.
Edit: Oops, Left my previous draft in the post.
Edited by Recreate, 21 May 2012 - 01:52 AM.
#3
Posted 21 May 2012 - 04:56 AM
When I was making games/demos that low level, I used OpenGL. NEHE was a big help for that, but then I ended up using at times the other DX APIs, especially DInput(this was before XInput), but then I "graduated" instead to using Irrlicht. Finally, I found GameMaker it since then have used it exclusively for my game projects. It's just that for a single person, 2d casual games tend to be much quicker than 3d games, and GameMaker does much for you in that aspect, and assuming you aren't trying to go outside of the limits(which are getting raised little by little) it makes things much easier in the long run.
#4
Posted 21 May 2012 - 08:53 AM
So I should use OpenGL? Oh and I have another question, GameMaker games are based in DirectX or OpenGL? I'm curious.
#5
Posted 21 May 2012 - 06:00 PM
As of Game Maker 8.0, it use DirectX, requiring version 8 or newer.
#6
Posted 21 May 2012 - 06:01 PM
dont quote me on this but i think i read somewhere that they use directx. they probably use opengl for their android runner though..atleast thats what i would do....
EDIT: ninjad
EDIT: ninjad
Edited by Gamer_Dude64, 21 May 2012 - 06:01 PM.
#7
Posted 21 May 2012 - 06:10 PM
I was assuming the windows version, since that is the only platform with directX. Otherwise it would use OpenGL on iPhones, Androids and other platforms that are not-PC's or XBoxes.
#8
Posted 22 May 2012 - 03:28 AM
Although OpenGL is cross-platform, and that's nice, there are many reasons to use DirectX instead (especially if you are only planning to do windows development). Simply put, DirectX does a lot of things for you that OpenGL will not. DirectX is not a graphics library; it's a full suite of tools necessary for developing a game. If you use OpenGL you will also have to use libraries for sound, loading images, fonts and even vector/matrix math. This is all things that DirectX will do for you.
There are other alternatives out there, however. These alternatives usually use OpenGL while keeping the simplicity of DirectX. A common one is SDL which I haven't personally used.
There are a lot of things to enjoy about DirectX and a lot of things to enjoy about OpenGL. However, DirectX is definitely the easier of the two to pick up and go. OpenGL will take some time.
There are other alternatives out there, however. These alternatives usually use OpenGL while keeping the simplicity of DirectX. A common one is SDL which I haven't personally used.
There are a lot of things to enjoy about DirectX and a lot of things to enjoy about OpenGL. However, DirectX is definitely the easier of the two to pick up and go. OpenGL will take some time.
#9
Posted 22 May 2012 - 07:17 AM
Thank you all. I'll propably use OpenGL, because maybe I'll put my games to be available in Mac and maybe Linux too. And I always wanted to make mobile games.
#10
Posted 22 May 2012 - 06:40 PM
well if you want to develop for android you can do it natively with c/c++ or with java.. im using java and OpenGL ES..
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











