GL_ALPHA/GL_LUMINANCE/GL_INTENSITY之差别

 转自:http://www.cnitblog.com/linghuye/archive/2008/08/23/48290.html

The difference between the three single-component texture formats, GL_ALPHA, GL_LUMINANCE and GL_INTENSITY, is in the way the four-component RGBA color vector is generated. If the value for a given texel is X, then the RGBA color vector generated is:

    * GL_ALPHA: RGBA = (0, 0, 0, X)

    * GL_LUMINANCE: RGBA = (X, X, X, 1)

    * GL_INTENSITY: RGBA = (X, X, X, X)

In other words, if we interpret the alpha as transparency, GL_ALPHA would represent a completely black texture with varying transparency, GL_LUMINANCE is an opaque texture with varying color (a grayscale image), and GL_INTENSITY is a combination where both the color and alpha channel is varying.

阅读更多
文章标签: vector image
个人分类: C/C++ Opengl
想对作者说点什么? 我来说一句

OpenGL API 之 glTexImage2D

简介

csxiaoshui csxiaoshui

2014-05-29 19:52:04

阅读数:15662

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭