Buffer Objects is the general term for unformatted linear memory allocated by the OpenGL context.
Questions tagged [buffer-objects]
19 questions
6
votes
1 answer
Can you use multiple targets with a single VBO?
Sample code:
1. glGenBuffers(1, &VboId);
2. glBindBuffer(GL_ARRAY_BUFFER, VboId);
3. glBufferData(GL_ARRAY_BUFFER, sizeof(Vertices), Vertices, GL_STATIC_DRAW);
4. glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0);
So we generate a generic VBO…

mpen
- 272,448
- 266
- 850
- 1,236
5
votes
2 answers
Should VBO be unbound before calling glDeleteBuffers?
Is it required that we should unbind a buffer object before deleting it? If I had bound it in a VAO and deleted it without unbinding (binding to 0), what will happen? Will the reference still exist?
public void dispose()
{
glBindVertexArray(0);
…

Sri Harsha Chilakapati
- 11,744
- 6
- 50
- 91
4
votes
1 answer
Multiple UBOs without specifying binding point index explicitly
I am looking into OpenGL Uniform Buffer Objects and Shader Storage Buffers. I think the question applies to both of them, but let's just focus on UBOs.
Tutorials seem to be saying that "block index" and "binding point index" are different things,…

spraff
- 32,570
- 22
- 121
- 229
3
votes
1 answer
Dynamic-length arrays as Shader Storage Buffer Objects
Let's say I have a dynamic number of "balls" which I want to access in my OpenGL shaders. In C++ the data might be like this:
struct Ball
{
glm::vec3 position;
glm:vec3 colour;
float size;
};
std::vector all_balls;
If I want to…

spraff
- 32,570
- 22
- 121
- 229
2
votes
2 answers
OpenCL Buffer Creation
I am fairly new to OpenCL and though I have understood everything up until now, but I am having trouble understanding how buffer objects work.
I haven't understood where a buffer object is stored. In this StackOverflow question it is stated…

JasonPh
- 147
- 1
- 9
2
votes
0 answers
when drawing to a window, are the previous contents usually discarded? and what's the best way of preserving them?
I'm trying to speedup the rendering (both latency and throughput wise) in the Inkscape vector image editor so that it can be more artist friendly.
I'm trying to decide whether to draw directly to the window or draw to an intermediate offscreen…

Yale Zhang
- 1,447
- 12
- 30
2
votes
1 answer
When does glBufferSubData return?
I want to transfer contents of a very large memory chunk to a sufficiently large GPU buffer and then immediately alter the contents of memory on CPU. Something like this in…

Sergey
- 7,985
- 4
- 48
- 80
2
votes
1 answer
OpenGL ES 3.0: zero-copy CPU rendering to texture?
I am working on a pure 2D project, where the screen is rendered by CPU, and I want to display it as a texture, but I do not want to upload the whole image for each frame. I cannot tell what parts are changed, so I assume the whole image is…

Ferenc
- 779
- 1
- 6
- 14
2
votes
2 answers
Reading data from the GPU asynchronously with Pixel Buffer Objects
Getting data from the GPU seems to be a very slow task if you want to read it synchronized with the rest of your application. One possibility is to read asynchronously with the help of Pixel Buffer Objects. Unfortunately, I am not able to see how…

testman
- 248
- 3
- 14
1
vote
1 answer
PBO streaming, exactly when does the sync happen?
I was trying to make ffmpeg decode and transform pixels into rgb8 format and write into a mapped pixel buffer and use streaming to update opengl texture, which is then rendered to a sdl window.
The decoding and uploading happens in a dedicated…

shangjiaxuan
- 205
- 1
- 10
1
vote
0 answers
OpenGL, Doing skybox and want outside of cube to be backface-culled, noticed something strange
I was trying to make a cube to backface cull the side outwards, I succesfully completed my indicies so it worked. But I stumbled upon a wierd thing, were when I for example wanted to change // bot indicies it didn't update in program until, I…

Adrian Nordin
- 19
- 1
1
vote
1 answer
How to bind multiple IBOs from one VBO in OpenGL
I am trying to render two different triangles with IBOs. I stored the six vertices in one VBO and tried to access them through two separate IBOs. The problem is the first IBO renders but the second doesn't. The createVertices and createIndices are…

Emcy
- 47
- 1
- 6
0
votes
1 answer
OpenGL 4 - UV Coordinates for Triangle Strip Cube
I have a cube made with a triangle strip, and I am trying to find the UV coordinates for it.
vert = new VBO(new Vector3[] {
new Vector3(1, 1, 1),
new Vector3(0, 1, 1),
new Vector3(1, 1, 0),
…
user11494366
0
votes
1 answer
Opengl 3/4 : Can I bind the same buffer object to different targets
In my specific case, I'm trying to bind a vertex buffer object into a uniform buffer object.
For more details, in my opaque object rendering pipeline in deferred shading, I create a G buffer then render light volumes one point light at a time using…

Roelin Heart
- 41
- 4
0
votes
1 answer
Having trouble with SSBO in JOGL
I've been trying to initialize an SSBO and pass it to a a compute shader.
int ssbo = glGenBuffers();
FloatBuffer buff =…

Boris Vassilev
- 91
- 8