开发者

How to render a grayscaled texture on Android?

开发者 https://www.devze.com 2023-01-22 07:43 出处:网络
I have a colored texture work as a menu button. Sometimes I w开发者_JAVA技巧ant to gray it out when it\'s disabled. How to do it without creating a new grayscaled texture? Can glBlendFunc do this for

I have a colored texture work as a menu button. Sometimes I w开发者_JAVA技巧ant to gray it out when it's disabled. How to do it without creating a new grayscaled texture? Can glBlendFunc do this for me? Thanks in advance.


To have a gray scale texture, you need to create such texture. For internal format set either luminance or intensity. See here for details : http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml


Use a fragment shader. However, for ES 1.0, I am not sure.

0

精彩评论

暂无评论...
验证码 换一张
取 消