GLES2.0中文API-glGenTextures

名称

glGenTextures- 生成纹理名称(ID)

C规范

void glGenTextures( GLsizei n,GLuint * textures);

参数

n

    指定要生成的纹理ID的数量。

textures

    指定存储生成的纹理ID的数组。

描述

glGenTextures产生个纹理ID存储在textures数组中,这个方法并不保存返回的是一串连续的整数数组,但是能保证的是:这些ID在调用glGenTextures之前都没有正在被使用。

生成的textures此时还是没有维度的,当他们第一次绑定纹理目标时才被指定维度(见glBindTexture)。

通过调用glGenTextures返回的纹理ID不会被后续调用返回,除非首先使用glDeleteTextures删除它们。

错误

GL_INVALID_VALUE:如果参数n是负数。

相关Gets

glIsTexture​​​​​​​

另见

glBindTexture​​​​​​​ glCopyTexImage2D glDeleteTextures​​​​​​​ glGet glGetTexParameter​​​​​​​ glTexImage2D​​​​​​​  glTexParameter

版权

https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glGenTextures.xml

https://blog.csdn.net/flycatdeng

Copyright © 1991-2006 Silicon Graphics, Inc.本文档的许可是根据SGI Free Software B License.详见http://oss.sgi.com/projects/FreeB/.

GLES2.0中文API-glGenTextures_第1张图片 QQ群

 

你可能感兴趣的:(gles,GLES2.0中文API)