I'm new to 3D OpenGL/DirectX world and I found out that OpenGL 4.1 and GLSL specifications were just released today.
A friend of mine gave me the Red Book for OGL v2.1 but, as far as I've read, 3.x and 4.x differ a lot from 2.x and a lot of things are deprecated now.
Can I use the book to start learning the basics of 3D and CG or is it better to find a newer copy?
Answer
In times like this I always head for the Steam Hardware Survey: http://store.steampowered.com/hwsurvey/ - you'll see that market penetration of DX10/11 class systems is at almost 80%; this being broadly equivalent to GL3.3 or above. This 80% is restricted to Vista/7 users - add in a DX10/11 GPU with XP and you rise to just over 90%.
Bearing in mind that we're talking about slightly more hardcore gamers here, you then need to start thinking about your target audience. Are these the people you want to target? Are you aiming at those with more downlevel hardware instead? What about Intel graphics? What about Mac and Linux users? These are all questions that you need to answer for yourself, so broadly general guidelines are the best you're going to get.
Adding to that, you need to take account of the fact that if you're starting to learn today with the intention of shipping something, you're looking at a period of about one year minimum before you get there (unless we're talking about really trivial/simple cases). With the upward trend of gfx capabilities continuing, we're looking at being real close to 100% uptake of GL3.3+ hardware by then.
Then factor in that with GL2.1 or lower you're going to be learning and using an awful lot of crufty old nonsense, even if you restrict yourself to the shaders and VBOs subset of GL2.1 (downlevel GLSL versions are nasty to use, and streaming VBOs are all but unusable without GL_ARB_map_buffer_range) - GL3.3+ has introduced much nicer (and more performant) ways of handling many things, you'll be making better use of the player's hardware (and they'll be grateful to you for that) and you'll be spending more time writing productive code rather than fighting an API that really doesn't want to co-operate with you.
And then of course there's the dreaded driver situation. The hard but true fact is that GL drivers on Windows are in a sorry state - NV support things they shouldn't, AMD don't support things they should, and with Intel you really need to restrict yourself to GL functionality for which there is an equivalent in D3D. The newer the GL_VERSION is the more likely it is you'll encounter driver bugs, but for GL3.3 things are reasonably stable now.
So the summary is that, in the absence of any other info (target audience, etc), I'd target GL3.3 as a baseline (possibly pulling in functionality from higher GL_VERSIONs where it's available and where it doesn't disrupt the codebase too much) unless there was a very specific and definitively identified reason to go any lower (and I'd want to be absolutely 100% certain of that rather than using some vague notion of "but what about those with older hardware"). In the latter case I wouldn't go below GL2.1, and I'd look to pull in as much 3.x functionality as possible even then.
No comments:
Post a Comment