Jump to content

  • Log In with Google      Sign In   
  • Create Account


Best Graphics to use C++ ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • This topic is locked This topic is locked
7 replies to this topic

#1 Assassin7257   Members   -  Reputation: 105

Like
0Likes
Like

Posted 27 February 2012 - 10:15 PM

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 ?

Sponsor:

#2 Jebbs   Members   -  Reputation: 276

Like
0Likes
Like

Posted 27 February 2012 - 11:10 PM

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.)

#3 Krohm   Crossbones+   -  Reputation: 3016

Like
0Likes
Like

Posted 28 February 2012 - 12:53 AM

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.

#4 meeshoo   Members   -  Reputation: 508

Like
0Likes
Like

Posted 28 February 2012 - 04:33 AM

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.

#5 NightCreature83   Crossbones+   -  Reputation: 2701

Like
0Likes
Like

Posted 28 February 2012 - 07:54 AM

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.
Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, Mad Max

#6 SimonForsman   Crossbones+   -  Reputation: 5965

Like
1Likes
Like

Posted 28 February 2012 - 09:48 AM

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)
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#7 mhagain   Crossbones+   -  Reputation: 7592

Like
0Likes
Like

Posted 28 February 2012 - 10:15 AM

<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.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#8 Josh Petrie   Moderators   -  Reputation: 3100

Like
0Likes
Like

Posted 28 February 2012 - 10:32 AM

This question has been asked and answered hundreds of times; please search the forum.

Josh Petrie | Core Tools Engineer, 343i | Microsoft C++ MVP





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS