Sign in to follow this  
albertkhor

DirectX vs OpenGL

Recommended Posts

i would like to create my own 3D engine for FPS. i just want to know DirectX is more easy to learn or opengl. as i know opengl do not support sound and input someone said that if use opengl can plug with directX sound and input is that true?

Share this post


Link to post
Share on other sites
Warning: These sort of threads get locked at random and without warning, because this discussion has been had to death.

IBTL: I'd say OpenGL, but that's just my opinion. Others will disagree.

Share this post


Link to post
Share on other sites
Quote:
Original post by ukdeveloper
Warning: These sort of threads get locked at random and without warning, because this discussion has been had to death.

IBTL: I'd say OpenGL, but that's just my opinion. Others will disagree.


thx u to inform me i'm new here!

Share this post


Link to post
Share on other sites
In terms of easier to learn, id say OpenGL, but DirectX is more organized.
These are graphics libraries, meaning that they will only help you put stuff
on the screen (like transformations and loading meshes etc). So an FPS can
be created with both libraries, its your choice.

P.S. you can use OpenGL with DirectInput

Share this post


Link to post
Share on other sites
If you are just learning and want all of the features, i.e. sound, input, graphics etc., I'd say learn DirectX as all of the subsystems work in a similar way.
If you just want to make a 3D engine, then either will do. Personally, I learned C++ from the start rather than learning C first and so DirectX felt more natural for me. OpenGL just didn't seem to flow, but since I've been learning C, i.e. non-OOP, OpenGL is starting to make more sense.
Basically, if you are an OO programmer, I'd suggest learning DirectX otherwise I'd say go with OpenGL as I think it would be easier.
Either way, both will do what you are looking for and I'd suggest at least having a go with both and deciding for yourself which one you are more comfortable with.
If you go with OpenGL, you could use DirectX for sound/music etc., but you've got other options including things like OpenAL.

Hope this helps,

PhilHalf

Share this post


Link to post
Share on other sites
Asking "DirectX vs OpenGL?" is much like asking "Apples or Oranges?" That is, until you've tried both you'll never really know which you like more so just pick one, try it, and if you like it keep eating them and maybe some other day you can try the other.

Share this post


Link to post
Share on other sites
ukdeveloper was right. If you had read the rules for the forums on GDNet, you would have seen that threads like these are not allowed since they often end up in religious wars.

But just for your info. None is better than the other. Both have their strengths and weakneses. So pick the one that appeals to you the most.

// Allmight

Share this post


Link to post
Share on other sites
Go with OpenGL. Then your buddies on Linux and Mac will be able to run your stuff.

Plus - You will be primed for future platforms like the Playstation 3. Eventually OpenGL will be the standard 3d api, like TCP/IP is for networking....

(Just kidding above - I strongly doubt there will be any standard in the near future, although it sure would be nice)

Share this post


Link to post
Share on other sites
Quote:
Original post by albertkhor
...

as i know opengl do not support sound and input someone said that if use opengl can plug with directX sound and input is that true?


well you could also use sdl, which is intended to be used together with opengl for 3d grafics.

Share this post


Link to post
Share on other sites
- It is wrong to ask this type of question (because you won't get an answer)
- It is wrong to recommend to a newb without giving tips/links to books, tuts etc.
- It is wrong to set too high goals (newb want to make 3d engine - impossible).
- It is wrong to learn only one of many choices, you should learn both
- It is wrong to ask this type of question (you should find out yourself), by that I mean ... start with one of them .. play around ... try next ... play around ... then I guess the choice will come by itself.

dx tuts
www.andypike.com - The best explanation ever, but the download to source doesn't work .. but I have them, others too maybe.
www.drunkenhyena.com/ <- maybe down???
www.toymaker.info/Games/index.html
http://triplebuffer.devmaster.net/tutorials.php
www.ultimategameprogramming.com/index2.php

opengl + dx
www.morrowland.com/apron/tut_gl.php
www.codesampler.com/

opengl
http://nehe.gamedev.net/ <- probably the best place for opengl

Share this post


Link to post
Share on other sites
Quote:
- It is wrong to set too high goals (newb want to make 3d engine - impossible).
- It is wrong to learn only one of many choices, you should learn both


^^ what exactly would you consider a newb?

Share this post


Link to post
Share on other sites
Quote:
Original post by AzCoder
Plus - You will be primed for future platforms like the Playstation 3. Eventually OpenGL will be the standard 3d api, like TCP/IP is for networking....

Actually OGL pretty much was the standard until Microsoft decided to jump into the ring. Although I know your quote was in jest, I do highly doubt that just because the PS3 uses OGL it would become standard, considering the PC, XBox, XBox360 all use a subset DirectX.

To the original poster, both APIs are great and serve their purpose. Quite honestly I would not want to use DirectX while coding procedural C and I would not want to use OpenGL while coding in OOP C++. Please note those are my opinions and not some standard. The vast majority of games on PCs are using DirectX, but the vast majority of graphics applications are using OpenGL as the main renderer. Just pick one, go through some tutorials, and make a game.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this