PDA

View Full Version : OpenGL ES and PBO ?



rldivide
12-21-2012, 08:07 AM
Hi,

With OpenGL you can do asynchronous texture transfer using a PBO, as described here: http://www.opengl.org/registry/specs/ARB/pixel_buffer_object.txt


glGenBuffers(1, &texBuffer);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, texBuffer);
glBufferData(GL_PIXEL_UNPACK_BUFFER_ARB, texSize, NULL, GL_STREAM_DRAW);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texWidth, texHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL);


However there is no such thing as "GL_PIXEL_UNPACK_BUFFER_ARB" on OpenGL ES. Is it possible to use PBO for texture transfer on OpenGL ES ? I can only find example with VBO.

aqnuep
12-21-2012, 08:15 AM
PBOs have been added to OpenGL ES with version 3.0, which is not yet widely supported, however, you can check whether your particular ES 2.0 implementation supports the ARB_pixel_buffer_object or EXT_pixel_buffer_object extension. Just because your headers don't define GL_PIXEL_UNPACK_BUFFER_ARB it doesn't necessarily mean that your target platform doesn't support it. Check the extension strings.

Unfortunately, however, if your target platform doesn't support it then you have to stick with regular, client data uploads.

rldivide
12-21-2012, 09:01 AM
Ah thanks for the tip !
I'm indeed using OpenGL ES 2.0, but I'm using it on desktop with a GeForce GTX 260 so maybe there's a way to use it anyhow.
However it doesn't list the pixel_buffer_object extension.. Maybe because I'm using the Angle OpenGL implementation from Qt 5 :/