往gpu缓冲区写入数据
void glBufferData( GLenum target,
GLsizeiptr size,
const GLvoid * data,
GLenum usage);
target
Specifies the target to which the buffer object is bound for glBufferData, which must be one of the buffer binding targets in the following table:
Buffer Binding Target Purpose
GL_ARRAY_BUFFER Vertex attributes
GL_ATOMIC_COUNTER_BUFFER Atomic counter storage
GL_COPY_READ_BUFFER Buffer copy source
GL_COPY_WRITE_BUFFER Buffer copy destination
GL_DISPATCH_INDIRECT_BUFFER Indirect compute dispatch commands
GL_DRAW_INDIRECT_BUFFER

glBufferData函数用于向GPU缓冲区写入数据,指定目标类型(如顶点、索引等)、数据大小、数据指针及预期使用模式(静态、动态或流式,读、写或复制)。该函数涉及不同类型的缓冲区,包括顶点、原子计数器、像素读写等,使用不同的usage标志可以优化数据传输效率。静态表示数据不变,动态表示频繁更改,流式用于每帧变化的数据。不同的内存类型(AGP、显存、系统内存)对数据读写速度有显著影响。
glBufferData&spm=1001.2101.3001.5002&articleId=90300748&d=1&t=3&u=28218635d57c476b96607555f4951534)
9411

被折叠的 条评论
为什么被折叠?



