Best Graphics to use C++ ?
Members - Reputation: 280
Posted 27 February 2012 - 11:10 PM
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.)
Crossbones+ - Reputation: 3167
Posted 28 February 2012 - 12:53 AM
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.
Crossbones+ - Reputation: 2931
Posted 28 February 2012 - 07:54 AM
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.
Crossbones+ - Reputation: 6167
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)
The voices in my head may not be real, but they have some good ideas!
Crossbones+ - Reputation: 8135
Posted 28 February 2012 - 10:15 AM
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.