Questions tagged [pbo]

Pixel Buffer Objects (PBO) are OpenGL buffer objects that are used for asynchronous uploading and downloading of pixel data.

79 questions
1
vote
1 answer

glreadpixels use pbo can't work - I want to use pbo to save image, rather than use cpu

I want to use pbo to save image, rather than use cpu. So I didn`t use bytebuff in glreadpixels, and use GLES30.glReadPixels(0, 0, getWidth(), getHeight(), GLES30.GL_RGBA, GLES30.GL_UNSIGNED_BYTE, null); But it can't work... This is my set fbo and…
Nino Liang
  • 45
  • 4
1
vote
0 answers

OpenGL PBO update texture wrong width height data

I have simple program trying to use PBO to update sub texture data which is dynamic generated. The problem is to get the correct order of data in texture because it gets inverted or not stored in the correct order. Here is some code for…
1
vote
1 answer

QGLBuffer with Compressed Textures

I'm trying to use QT's QGLBuffer with glCompressedTexImage2D() and glCompressedTexSubImage2D() but with no success. This is a working segment of code using QGLBuffer and glTexImage2D(): auto pbo = new…
Boon
  • 95
  • 1
  • 9
1
vote
0 answers

OpenGL tiled texture uploading with PBO

I'm using PBO as follows: glGenBuffersARB(1, &pboIds); glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, pboIds); glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, FB_SIZE, 0, GL_DYNAMIC_DRAW_ARB); unsigned char* ptr = (unsigned…
jaeyong
  • 8,951
  • 14
  • 50
  • 63
1
vote
1 answer

OpenGL texture upload using PBOs?

I'm developing an OpenGL application using OpenGL2.1 and want to upload textures via threads. What I have done so far: Create a second context and share between the two Upload texture data in a thread Everything is working fine, except that I…
char8_t
  • 320
  • 2
  • 8
1
vote
0 answers

How to copy/render a Pixel Buffer to the back buffer in OpenGL 3.X

I am trying to perform something like the old glDrawPixels: I have a Pixel buffer created with text and I would like to apply it to the back buffer (where all the scene is already rendered). unsigned char a[] = {255, 255, 255, 255, 0, 0, 255, 255,…
Adrian Maire
  • 14,354
  • 9
  • 45
  • 85
1
vote
1 answer

Android 4.3 PBO not working

I am using PBO to take screenshot. However, the result image is all black. It works perfectly fine without PBO. Is there any thing that I need to take care before doing this ? I even tried by rendering to a FBO and then use…
Eledra Nguyen
  • 400
  • 1
  • 12
1
vote
0 answers

glReadPixels works but returns INVALID_OPERATION when working with PBO

I am confused because I have working code that gives me INVALID_OPERATION with glreadpixels My guess is that it is causing / will cause performance issues, and even if it does not I wonder if it may result in unreliable code. I am doing offscreen…
cloudraven
  • 2,484
  • 1
  • 24
  • 49
1
vote
0 answers

OpenGL PBO texture uploading oddities

I'm basing my tests on this popular PBO example (see pboUnpack.zip from http://www.songho.ca/opengl/gl_pbo.html). Tests are done on PBO Mode 1 per the example. Running the original sample, I found that on my NVIDIA 560GTX PCIe x16 (driver v334.89…
Zach Saw
  • 4,308
  • 3
  • 33
  • 49
1
vote
1 answer

LWJGL Using PBO for reading pixels fail

I'm trying to read from the framebuffer Asynchronously but glReadPixels() generates an INVALID_OPERATION error. I've read what might cause this error but i haven't found any problem in my code: int PBOHandle = glGenBuffers(); // PBOHandle != 0 …
Mk3Y
  • 35
  • 5
1
vote
1 answer

glTexSubImage2D with GL_PIXEL_UNPACK_BUFFER gives GL_INVALID_OPERATION

Currently I am attempting to use PBOs to get video data to textures. I'm not sure if what I'm trying to do is even possible, or a good way to do it if it IS possible... I have 3 textures with the GL_RED format (one for each channel, not using Alpha…
1
vote
1 answer

OpenGL PBO's not working on nVidia graphics card

I'm trying to render RGB frames using openGL. When memory is allocated on the CPU the code works fine. However, when i allocate memory on the GPU using the concept of Pixel Buffer Objects, i get a problem while rendering the frames. The problem is…
sam
  • 289
  • 5
  • 16
1
vote
0 answers

Modify an existing opengl application to render to a PBO (and from there to a file)?

I want to modify an existing OpenGL application to render to a PBO and then read the PBO to generate an encoded video of what was originally going to be rendered to the screen. Since performance is key, I cannot stall the pipeline by doing…
cloudraven
  • 2,484
  • 1
  • 24
  • 49
1
vote
2 answers

glMapBufferARB returns "out of bounds" address in GDB?

When I use GDB to debug OpenGL programs, there is a misleading behavior of GDB. I get a address from glMapBufferARB, the address in GDB shows $35 = (GLubyte *) 0xb74bb000
And I can't print its content. However, I…
Martin Wang
  • 957
  • 14
  • 18
0
votes
1 answer

How to read a 3D texture from GPU memory with Pixel Buffer Objects

I'm writing data into a 3D texture from within a fragment shader, and I need to asynchronously read back said data into system memory. The only means of asynchronously initiating the packing operation into the buffer object seems to be calling…
Awaki
  • 65
  • 7