Questions tagged [pbo]

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

74 questions
31
votes
3 answers

glPixelStorei(GL_UNPACK_ALIGNMENT, 1) Disadvantages?

What are the disadvantages of always using alginment of 1? glPixelStorei(GL_UNPACK_ALIGNMENT, 1) glPixelStorei(GL_PACK_ALIGNMENT, 1) Will it impact performance on modern gpus?
ronag
  • 43,567
  • 23
  • 113
  • 204
12
votes
2 answers

Reading the pixels values from the Frame Buffer Object (FBO) using Pixel Buffer Object (PBO)

Can I use Pixel Buffer Object (PBO) to directly read the pixels values (i.e. using glReadPixels) from the FBO (i.e. while FBO is still attached)? If yes, What are the advantages and disadvantages of using PBO with FBO? What is the problem with…
Rudi
  • 680
  • 1
  • 8
  • 19
9
votes
1 answer

OpenGL/PBO pixel drawing example needed

I need to draw pixels very fast on a screen. I found this interesting page Fast pixel drawing library author posted: "Using an OpenGL texture along with a PBO seems to be the best choice. Thanks." I guess OpenGL/PBO is what i need. I was reading…
Stan
  • 91
  • 1
  • 1
  • 2
9
votes
3 answers

Android NDK OpenGL ES 2.0 Texture Pitch

Is there any way to blit a texture in opengl es 2.0 with a pitch that differs from its width. Normally I would fix this by using a PBO or adjusting the GL_PACK_ROW_LENGTH via glPixelStore. However it seems neither GL_PIXEL_UNPACK_BUFFER for…
Halsafar
  • 2,362
  • 3
  • 25
  • 51
8
votes
1 answer

Why is using multiple Pixel buffer Objects advised. Surely it is redundant?

This article is commonly referenced when anyone asks about video streaming textures in OpenGL. It says: To maximize the streaming transfer performance, you may use multiple pixel buffer objects. The diagram shows that 2 PBOs are used…
cds84
  • 171
  • 9
8
votes
2 answers

Asynchronous glReadPixels with PBO

I want to use two PBOs to read pixel in alternative way. I thought the PBO way will much faster, because glReadPixels returns immediately when using PBO, and a lot of time can be overlapped. Strangely there seems to be not much benefit. Considering…
Martin Wang
  • 927
  • 12
  • 17
7
votes
2 answers

Opengl Unsynchronized/Non-blocking Map

I just found the following OpenGL specification for ARB_map_buffer_range. I'm wondering if it is possible to do non-blocking map calls using this extension? Currently in my application im rendering to an FBO which I then map to a host PBO…
ronag
  • 43,567
  • 23
  • 113
  • 204
6
votes
1 answer

copying texture from GPU to CPU using pixel buffer objects

I am new to OpenGL and have currently copying the contents of a 2D texture back to CPU memory as follows: std::vector frame-data(width * height * 4); glBindTexture(GL_TEXTURE_2D, tid); glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA,…
Luca
  • 8,260
  • 12
  • 71
  • 167
5
votes
1 answer

Copying pixels directly into GPU memory with PBO in OpenGL ES 2.0

I read it should be possible to transfer pixel data directly inside the GPU memory using pixel buffer objects. What I'm not understanding is if PBO is supported in OpenGL ES 2.0. I found incoherent information. Is PBO supported under OpenGL ES…
Luca Carlon
  • 8,636
  • 9
  • 52
  • 87
5
votes
0 answers

How does GL_MAP_COHERENT_BIT work?

glBufferStorage has a flag GL_MAP_COHERENT_BIT, this flag has the following description: Shared access to buffers that are simultaneously mapped for client access and are used by the server will be coherent, so long as that mapping is performed…
Tom Deseyn
  • 1,420
  • 1
  • 14
  • 24
5
votes
0 answers

glMapBufferRange() is slow and memcpy() of the mapped data is also slow on Android

I managed to write a video recording demo which is similar to ContinuousCaptureActivity of grafika(Source code of ContinuousCaptureActivity.java). The difference is that grafika used hardware encoding but I used software encoding. For software…
dragonfly
  • 1,055
  • 12
  • 34
4
votes
1 answer

When can I release a source PBO?

I'm using PBOs to asynchronously move data between my cpu and gpu. When moving from the GPU i know I can delete the source texture after I have called glMapBuffer on the PBO. However, what about the other way around? When do I know that the transfer…
ronag
  • 43,567
  • 23
  • 113
  • 204
4
votes
0 answers

Using glReadPixels with PBO does not improve performance (GLES3)

I'm trying to implement the PBO logic with glReadPixels (on an Android app), in order to read the data asynchronously. The motivation for this is that the app renders a video on screen, and I want to take screenshots of that video, without delaying…
AnatH
  • 76
  • 5
4
votes
1 answer

Android OpenGL ES 3.0 PBO instead of glReadPixels()

I want to improve glReadPixels() performance using PBO (for GLES 3 devices) and I ran into a problem in this piece of code: final ByteBuffer pboByteBuffer = ByteBuffer.allocateDirect(4 * mWidth *…
Sam
  • 1,594
  • 16
  • 25
4
votes
1 answer

Performance boost for glReadPixels in Android by OpenGL ES 3.0

I found some ways to speed up glReadPixels by OpenGL ES 3.0, but I am not sure if it works or not. specifies the fifth argument of glReadPixels() as GL_BGRA to avoid unnecessary swizzle. use PBO as this mentioned. In order to verify, I updated to…
Justin
  • 115
  • 3
  • 8
1
2 3 4 5