For instance, I'm using GL_LUMINANCE_ALPHA to transfer two component data to texture. Someone told me that some internal format constants like GL_LUMINACE_ALPHA are deprecated in OpenGL 3.0(maybe 4.0?) or higher, so use GL_RG or GL_RG8, etc.
However, my target OpenGL version is 2.0 or higher and the specification of OpenGL 2.0 does not contain GL_RG/GL_RG8. In this case, I think there are three possibilities:
- Use GL_RG/GL_RG8 if the program can run well even with devices which supports OpenGL 2.0 only.
- Keep old constants if the program can run well with devices whose OpenGL version is so high that old constants are deprecated.
- Detect the OpenGL version in run-time and swtich the constants for each version.
What should I choose? I don't want to take 3. unless I have to because it makes things harder and complicated.