Jump to content
  • Advertisement
Sign in to follow this  
irreversible

OpenGL Picking a target GL/GLSL version

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

My requirements currently are:

- OpenGL 2.0/GLSL 1.10 for core components, which also have to be blackboxed and portable, and have mostly to do with GUI drawing
- OpenGL 3.0 as the minimum version for some application components, but already have much of CPU emulation code written

Although both versions are quite old and wide-spread by now, there might be some people in my target audience who don't have 3.0 enabled cards. Since I do have CPU fallbacks for critical 3.0-dependent components (eg particle transform, bone animation, etc), the question boils down to deciding the minimum GLSL version - whether it can be 3.0 across the board or if it's worth keeping any blackboxed code using an older GLSL version.

Basically, I'm trying to not assume there's a speed benefit for doing something in a newer version that can just as easily be done in an older version of GLSL, which kinds of begs the question - is there a compelling reason to force already encapsulated core components up a couple of version if the feature set doesn't really require it?

In short, the question is - is there a penalty to using GLSL 1.10 when a newer version is available (things like deprecated and sloppier compiler, direct speed disadvantages due to deprecation on driver level, possible removal of older shader language versions by the Khronos group in the future, etc)?

Share this post


Link to post
Share on other sites
Advertisement
If the shader code is the same then in theory things should perform the same too. Newer GLSL versions may be able to pull some optimizations in the shader compiler by e.g. compiling to new and (hopefully) more efficient instructions that weren't available in the old version, but that's a fairly low-level detail that you probably shouldn't worry about until your final optimization passes.

I find it slightly amusing that on the one hand you're trying not to assume something but yet on the other you're making a huge assumption, specifically: "there might be some people in my target audience who don't have 3.0 enabled cards". That's not intended as a personal criticism, but is intended to call it out as an assumption; I'd strongly advise that you research and profile your target audience before committing to anything based on that assumption.

Share this post


Link to post
Share on other sites

I find it slightly amusing that on the one hand you're trying not to assume something but yet on the other you're making a huge assumption, specifically: "there might be some people in my target audience who don't have 3.0 enabled cards". That's not intended as a personal criticism, but is intended to call it out as an assumption; I'd strongly advise that you research and profile your target audience before committing to anything based on that assumption.

Yet, "there might be some people in my target audience who don't have 3.0 enabled cards" is not really an assumption, is it?
I'd say it's actually very open-minded to consider that something might be true.

... But aside from that, I use as old a version as possible, test on more machines, different cards,
and then static link to GL and the extensions I use, to avoid referring to deprecated, later maybe even gone OpenGL functionality in an external binary. Edited by SuperVGA

Share this post


Link to post
Share on other sites

I'd say it's actually very open-minded to consider that something might be true.


It's open-minded to consider it for sure, but that should be followed by research and a decision made based on actual facts, not suppositions.

Share this post


Link to post
Share on other sites

[quote name='SuperVGA' timestamp='1354618993' post='5007037']
I'd say it's actually very open-minded to consider that something might be true.


It's open-minded to consider it for sure, but that should be followed by research and a decision made based on actual facts, not suppositions.
[/quote]
Ah, ok. I see what you meant now; it's because even the thought was taken out of the blue, and a choice should be founded on something regardless of whether it's open-minded or not.
For instance, he should have found that ok, only 2‰ of my audience lacks 3.0 enabled cards, and that amount is declining, -then made a decision.
Alright, back to the topic. Pardon my stray into assumption/nonassumptions. Edited by SuperVGA

Share this post


Link to post
Share on other sites
True, I'm basing my assumptions on a few things that I don't even know how to profile. In my case I can't really look at something like the Steam hardware statistics report, because I want to target older systems that are there (which in itself would be a kind of an answer to my question): in particular, desktop systems. So I'm basing my assumptions on a very limited dataset of people that I know. While a valid criticism, this is somewhat moot, though - in particular, because my question was actually worded the other way around: instead of "will upgrading my GL requirements limit my audience" I was asking "whether not upgrading could bite me in the butt at a later date" :)

A lot of stuff in GLSL 1.1 and 1.2 were deprecated with the introduction on 1.3, most (or all?) of which is now available in compatibility mode. I'm trying to leverage between two paradigms here: a valid justification of adhering to a new standard and my admittedly poor assumption that doing so will affect my target audience.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!