Page 1 of 1

DirectX vs OpenGL

Posted: Sun Mar 22, 2009 9:57 pm
by BlueMonkey5
From what i've been reading, OpenGL is easier to use... is this true? And which of the DirectX components handles 2D games? Certainly doesn't seem like Direct3D does!

Re: DirectX vs OpenGL

Posted: Sun Mar 22, 2009 11:46 pm
by Joeyotrevor
I've always used OpenGL. In my opinion, it is a lot easier to learn. I've only used DirectX in C# once when I was learning how to make games(and before i discovered the wonders of c++ ;) ).
For 2D rendering I believe you can use DirectDraw, although you most probably can do it using Direct3D. I plan on learning how to use DirectX in C++ eventually, but right now OpenGL is good enough. This wiki article has a good comparison of the two: http://en.wikipedia.org/wiki/OpenGL_vs_DirectX

Re: DirectX vs OpenGL

Posted: Sun Mar 22, 2009 11:52 pm
by LeonBlade
I've used DirectX in Visual Basic (retarded because VB is basically IMPOSSIBLE to write games in lol) and I've used it in C# (epoch phail XN-gay).
I've only used OpenGL a few times... and I mean like once or twice, but I found that it seemed much more in-depth and advanced right from the start.

Re: DirectX vs OpenGL

Posted: Mon Mar 23, 2009 7:54 pm
by BlueMonkey5
I've read on Wiki that directX is only used with Microsoft BASIC languages, and not with C. is this true, or did I misunderstand that? i can not seem to find which languages are compatible with directX components.

Re: DirectX vs OpenGL

Posted: Mon Mar 23, 2009 8:33 pm
by herby490
I know for a fact that directx is compatible with C++ , C#, and VB. Not sure if there are any others.

Re: DirectX vs OpenGL

Posted: Mon Mar 23, 2009 8:56 pm
by BlueMonkey5
oooh, well thats good.  I just saw that this same exact topic was posted here in February, so complete fail on my part.  But i do realize that DirectX is a series of development components.  Soooo, here's something i didnt see them talk about: i can understand that if you're using DirectX, you have an entire library of everything you need.  BUT, if one decides to go with OpenGl, then what options do they have for the rest of the components such as audio and user input? Is SDL the only thing needed to assist OpenGL with all these tasks? DirectX is a whole package, so i can see the appeal there because all the resources you may need are in one bundle. On the other hand, when working with OpenGL, is SDL all you need?

Re: DirectX vs OpenGL

Posted: Mon Mar 23, 2009 11:54 pm
by CC Ricers
Microsoft developed DirectX for making games from the get-go, so DirectX has a complete suite of functions for graphics, sound, and user input. The graphics component of DirectX is called Direct3D. OpenGL is just graphical functions and it needs to be wrapped around other sets of functions for making the window, taking in input, etc.

So you can pretty much use anything to combine OpenGL with, like Win32 (for Windows only), SDL, GLUT, WxWidgets, etc. I started using OpenGL with GLUT for class, but for making games, SDL is a better, more streamlined option. It has functions for setting up the window, taking input from keyboard or joystick, and basic sound controls (SDL mixer). That's not to say DirectX is very limited in its wrapping options. I was able to combine SDL with DirectX with ease.

Re: DirectX vs OpenGL

Posted: Tue Mar 24, 2009 6:21 pm
by BlueMonkey5
well, i gotta be honest and say that the Direct series does seem apealing because of its convenience BUT if the only thing needed to make a game is SDL and openGL (along with C or whatever of course) then I would like to check that out first. guess it all comes down to preference although i do remember seeing someone say that direct3d is a bit easier to use than opengl.

Re: DirectX vs OpenGL

Posted: Tue Mar 24, 2009 6:22 pm
by kostiak2
BlueMonkey5 wrote:well, i gotta be honest and say that the Direct series does seem apealing because of its convenience BUT if the only thing needed to make a game is SDL and openGL (along with C or whatever of course) then I would like to check that out first. guess it all comes down to preference although i do remember seeing someone say that direct3d is a bit easier to use than opengl.
You can use SDL alone.. without OpenGL OR DX.. ;)

Re: DirectX vs OpenGL

Posted: Tue Mar 24, 2009 6:34 pm
by BlueMonkey5
wow, thats great. you actually answered a question i had. so we dont HAVE to use openGL with sdl... its just an option because opengl can handle more involved graphics. so from what you said, SDL does graphics too... sounds like a nice little API to me. i can see the appeal with it, as it seems like it has all the components that someone would need to make a complete game. i've read in the forums that the graphics part of SDL is not that powerful but i'm not exactly sure what that meant. besides, i want to start off with extremely basic games anyway... as all beginners should :)

Re: DirectX vs OpenGL

Posted: Tue Mar 24, 2009 6:37 pm
by kostiak2
BlueMonkey5 wrote:wow, thats great. you actually answered a question i had. so we dont HAVE to use openGL with sdl... its just an option because opengl can handle more involved graphics. so from what you said, SDL does graphics too... sounds like a nice little API to me. i can see the appeal with it, as it seems like it has all the components that someone would need to make a complete game. i've read in the forums that the graphics part of SDL is not that powerful but i'm not exactly sure what that meant. besides, i want to start off with extremely basic games anyway... as all beginners should :)
Well it's not powerful in the way that you can't do things like zooming or rotating efficiently.. but loading graphics and moving them around (which most simple 2d need) can be easily done with SDL alone.

Re: DirectX vs OpenGL

Posted: Tue Mar 24, 2009 6:50 pm
by BlueMonkey5
perfect. what a nice little thing SDL sounds like. cant wait! (enthusiastic now, but just wait till it frustrates me!!)... can't wait!! haha :D

Re: DirectX vs OpenGL

Posted: Tue Mar 24, 2009 8:31 pm
by herby490
I know just how you feel. I can not wait until I get into SDL and I am almost there just have a few more chapters in my book learning about semi-advanced classes now.

Re: DirectX vs OpenGL

Posted: Fri Mar 27, 2009 9:44 pm
by BlueMonkey5
awesome. sounds like youre really into it!