grayscale loaded as gl_alpha: all texture is white - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: grayscale loaded as gl_alpha: all texture is white (/thread-8550.html)
grayscale loaded as gl_alpha: all texture is white - sefiroths - Jan 17, 2011 09:37 AM
based on this source code,
i had tried to load a grayscale and loading as alpha...
what i have changed is:
in eglview, in init functions i have loaded 2 images, one grayscale, and rendered them with this gl init
but what is displayed is a rectangle all white
do someone have an example od loading grayscale as alpha or can someone look this code?
i'm not able to find the error
RE: grayscale loaded as gl_alpha: all texture is white - AnotherJake - Jan 17, 2011 03:31 PM
I don't know, but the first thing you should do is get rid of that texEnv call. The default is
and I can't imagine why you'd use anything else.
RE: grayscale loaded as gl_alpha: all texture is white - sefiroths - Jan 18, 2011 12:34 AM
thanks for the fast reply.
i have putted glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND_SRC);
because in other threads around the web i have found it as a fix for this problem.
however, i tried glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); and doesn't solve this problem.
if i load the image as a rgb without alpha, the image is displayed correcly...
i gave managed the image in photoshop, and it results (as it say) grayscale/8.
i have opened windows paint and copy/paste the image and saved as bmp, nothing changed