首页 > 代码库 > OpenGL缓冲区

OpenGL缓冲区

缓冲区保存在GPU内存中

1. 创建缓冲区

glGenBuffers()

2. 绑定缓冲区

glBindBuffer()

缓冲区绑定点:

GL_ARRAY_BUFFER, GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, GL_ELEMENT_ARRAY_BUFFER,

像素缓冲区(PBO)绑定点GL_PIXEL_PACK_BUFFER, GL_PIXEL_UNPACK_BUFFER

GL_TEXTURE_BUFFER, GL_TRANSFORM_FEEDBACK_BUFFER, GL_UNIFORM_BUFFER

3. 填充缓冲区

glBufferData()

glBufferSubData()

4. 删除缓冲区

glDeleteBuffers()

5. 读取缓冲区

glReadbuffer()

glReadPixels()

OpenGL缓冲区