DirectX vs OpenGL

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

DirectX vs OpenGL

Post 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!
User avatar
Joeyotrevor
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 62
Joined: Thu Jan 22, 2009 6:24 pm
Programming Language of Choice: C++

Re: DirectX vs OpenGL

Post 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
Last edited by Joeyotrevor on Mon Mar 23, 2009 12:02 am, edited 1 time in total.

Code: Select all

eb 0c 48 65 6c 6c 6f 20 77 6f 72 6c 64 21 31 d2 8e c2 30 ff b3 0a bd 02 7c b9 0b 00 b8 00 13 cd 10 eb fe
User avatar
LeonBlade
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1314
Joined: Thu Jan 22, 2009 12:22 am
Current Project: Trying to make my first engine in C++ using OGL
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: Blossvale, NY

Re: DirectX vs OpenGL

Post 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.
There's no place like ~/
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

Re: DirectX vs OpenGL

Post 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.
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: DirectX vs OpenGL

Post by herby490 »

I know for a fact that directx is compatible with C++ , C#, and VB. Not sure if there are any others.
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

Re: DirectX vs OpenGL

Post 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?
CC Ricers
Chaos Rift Regular
Chaos Rift Regular
Posts: 120
Joined: Sat Jan 24, 2009 1:36 am
Location: Chicago, IL

Re: DirectX vs OpenGL

Post 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.
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

Re: DirectX vs OpenGL

Post 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.
User avatar
kostiak2
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 74
Joined: Tue Mar 24, 2009 4:08 pm

Re: DirectX vs OpenGL

Post 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.. ;)
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

Re: DirectX vs OpenGL

Post 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 :)
User avatar
kostiak2
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 74
Joined: Tue Mar 24, 2009 4:08 pm

Re: DirectX vs OpenGL

Post 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.
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

Re: DirectX vs OpenGL

Post 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
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: DirectX vs OpenGL

Post 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.
User avatar
BlueMonkey5
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 86
Joined: Fri Feb 20, 2009 12:54 am

Re: DirectX vs OpenGL

Post by BlueMonkey5 »

awesome. sounds like youre really into it!
Post Reply