opengl之自动纹理

9 篇文章 0 订阅

自动纹理介绍:

      自动纹理可以用来产生轮廓,还可以模拟反射。为了得到这些效果,让opengl为物体自动产生纹理坐标,而不是自己去使用glTexCoord*();为了自动产生纹理坐标,使用glTexGen()函数。

      

v glTexGen{ifd}(GLenum coord , GLenum pname , TYPEparam );
void glTexGen{ifd}v(GLenum
coord , GLenum pname , TYPE * param ); coord , must be GL_S, GL_T, GL_R, or GL_Q to indicate whether texture coordinate s, t, r , or q is to be generated. The pname parameter is GL_TEXTURE_GEN_MODE, GL_OBJECT_PLANE, or GL_EYE_PLANE. If it's GL_TEXTURE_GEN_MODE, param is an integer (or, in the vector version of the command, points to an integer) that's either GL_OBJECT_LINEAR, GL_EYE_LINEAR, or GL_SPHERE_MAP. These symbolic constants determine which function is used to generate the texture coordinate. With either of the other possible values for pname , param is a pointer to an array of values (for the vector version) specifying parameters for the texture-generation function. oid
Specifies the functions for automatically generating texture coordinates. The first parameter, [原创]OpenGL入门学习——第十一课(1)【转】

http://hi.baidu.com/luckwxx623/blog/item/dc68abf00378f4cb7931aae4.html

下面这个函数。。。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值