【发布时间】:2011-10-13 04:25:00
【问题描述】:
我想使用 CUDA 来操作我在 opengl 中使用的纹理。知道我需要为此使用 PBO,我想知道是否每次像这样对 PBO 进行更改时都必须重新创建纹理:
// Select the appropriate buffer
glBindBuffer( GL_PIXEL_UNPACK_BUFFER, bufferID);
// Select the appropriate texture
glBindTexture( GL_TEXTURE_2D, textureID);
// Make a texture from the buffer
glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, Width, Height,GL_BGRA, GL_UNSIGNED_BYTE, NULL);
glTexSubImage2D 等是否从 PBO 复制数据?
【问题讨论】: