开发者

How to render a grayscaled texture on Android?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜