OpenGL API - glGenBuffers

Name

glGenBuffers — generate buffer object names

产生缓冲区对象名

C Specification

void glGenBuffers(GLsizei  n,
 GLuint *  buffers);

Parameters

n

Specifies the number of buffer object names to be generated.

指明需要产生的缓冲区的数量

buffers

Specifies an array in which the generated buffer object names are stored.

指明存储产生的缓冲区的数组,n个缓冲区通过这个参数返回。

Description

glGenBuffers returns n buffer object names in buffers. There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none of the returned names was in use immediately before the call to glGenBuffers.

Buffer object names returned by a call to glGenBuffers are not returned by subsequent calls, unless they are first deleted with glDeleteBuffers.

No buffer objects are associated with the returned buffer object names until they are first bound by calling glBindBuffer.

glGenBuffers通过参数buffers返回n个缓冲区对象。不保证这些缓冲区对象是连续的整数,但保证返回的缓冲区名字在调用这个glGenBuffers之前都是未被使用的。

如果没有使用glDeleteBuffers删除缓冲区对象,那么由glGenBuffers返回的缓冲区对象名在后面的调用中是不会返回的。

在使用glBindBuffer之前,程序是没有与 本函数返回的缓冲区对象名相关联的缓冲区对象 绑定的。

Errors

GL_INVALID_VALUE is generated if n is negative.

GL_INVALID_VALUE : n为负值

Associated Gets

glIsBuffer

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值