Jump to content
  • Advertisement
Sign in to follow this  
Assassin7257

Best Graphics to use C++ ?

This topic is 2477 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

Soon, I will start trying to use graphics but first I was wondering which is the best to use and the most versetile. OpenGL or DirectX ? Which one of the two is better to learn ?

Share this post


Link to post
Share on other sites
Advertisement
It depends on what your goals are. Both are good.

If you want to focus just for Windows stuff, DirectX would probably be your best bet. If you want to make things available for more systems, then OpenGL would be a better choice.

One isn't necessarily better than the other.They both do the same kinds of things.(And by same kinds of things I mean OpenGL vs Direct3D. DirectX also does sounds and input.)

Share this post


Link to post
Share on other sites
Do you care about cross-platform development on linux, apple and portables.
If yes, you have no choice. OpenGL.

Are you a learner wanting to just get introduced to the tech? Do you just want to understand the basics on your an then move on? Direct3D 11 on the appropriate feature level.

To be completely honest, I strongly suggest against OpenGL at this point.

Share this post


Link to post
Share on other sites
Either one will be OK for now, because once you get to master one, it is very easy to learn the other if you really need to.

Share this post


Link to post
Share on other sites
Both operate on the similar principle in the background, the only difference really is syntax of the API and the API. Once you understand the ideas behind them you can use both with a reference manual handy.

I'd suggest writing shaders in CG and integrating CG into GL and DX as that will allow you to write shaders in a API independant way. CG is capable of translating itself into GLSL or HLSL symbols depending on which API is used.

Share this post


Link to post
Share on other sites

Soon, I will start trying to use graphics but first I was wondering which is the best to use and the most versetile. OpenGL or DirectX ? Which one of the two is better to learn ?


Basically the 2 APIs are roughly equivalent in terms of features and performance today with 2 notable exceptions:

1) Intel has shitty OpenGL drivers on Windows(and Linux, but you don't have much choice there (not sure about Mac)), nvidias glsl shader compiler isn't very strict so shaders that work on nvidia hardware might not necessarily work properly on AMD hardware(It is a good idea to test your OpenGL shaders using AMD hardware for this reason) (AMD and nvidia both provide solid OpenGL performance today though), If you want to get the most out of Intels low end integrated GPUs on Windows then you should use D3D.

2) D3D is only available on Microsofts platforms, if you want Mac/Linux/BSD/whatever support then you need to use OpenGL, (iOS and Android use OpenGL:ES which is similar but not identical to OpenGL).

If you're only targeting Windows then D3D will give you less headaches, if you're only targeting Mac OR Linux then go with OpenGL. (You really shouldn't target more than one platform if you're writing "low level" code as a beginner)

If you are making a game (Rather than playing around with low level graphics APIs for learning purposes) then you should seriously consider using a higher level game engine instead or atleast a game oriented framework. (This also makes crossplatform development alot easier as you can avoid dealing directly with the underlying OS)

Share this post


Link to post
Share on other sites
<snip>awesome</snip>


This pretty much sums up the situation as well as can be. The only thing worth adding is that D3D tends to have better documentation and tools available, which are quite invaluable things to have.

Share this post


Link to post
Share on other sites

This topic is 2477 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.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!