glTexImage2D with GL_ALPHA
I am using opengl es. I thought that I would be saving memory by using glTexImage2D with GL_ALPHA rather than GL_RGBA, but according to the documentation (http://www.khronos.org/opengles/documentation/opengles1_1/gl_egl_ref_1_1_20041110/glTexImage2D.html) everything is just converted to RGBA in the end, so it makes no difference.
Is this right?
The function behaves as if it was expanded to RGBA with fixed RGB values, but that doesn't mean it actually happens. That is an implementation detail you don't know about.
There are internal 8bpp formats, GL_LUMINANCE8 is usually preferred, I think. In your shader, all 4 components of texel.xyzw are filled with the same value.
Also, there are many alias-names to the same really-internal format, which is making things confusing imho. I rely on vendor-provided (nVidia/AMD) examples for how to define texture-formats.
Also, there are many alias-names to the same really-internal format, which is making things confusing imho. I rely on vendor-provided (nVidia/AMD) examples for how to define texture-formats.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement