Skip to main content

All Questions

Tagged with
0 votes
1 answer
1k views

fastest way to "read only" from buffer

First of all I have a struct which looks like the following: ...
Thomas's user avatar
  • 1,299
2 votes
1 answer
3k views

Using buffers correctly in OpenGL compute shaders

I'm re-writing an algorithm that I first wrote using matrix/vector operation into OpenGL kernels in order to try to maximiz the performances. I have a basic knowledge of OpenGL, so I was able to get ...
04348's user avatar
  • 23
2 votes
1 answer
235 views

Can the framebuffer in OpenGL jargon or its color buffer end up being the one and the same memory location as the one scanned by a display controller?

My understanding is: the 'framebuffer' in OpenGL is a collection of buffers: many (due to swapping or stereo rendering) color buffers, (only one?) z-buffer and (only one?) stencil buffer; each OpenGL ...
user1624691's user avatar
2 votes
1 answer
1k views

In what scenarios and how does GL_ARB_buffer_storage help performance?

The Dolphin emulator for GameCube/Wii has the ability to use the ARB_buffer_storage (or EXT_buffer_storage for GLES) to improve rendering performance. From the extension's description, a GPU driver ...
jdonald's user avatar
  • 127
1 vote
1 answer
1k views

Multiple VAO share a EBO (OpenGL 3.3)

As mentioned here, multiple VAOs can share a single VBO. However, can multiple VAOs share a single EBO? For example, I want to create 2 rectangles. So, I do the following: ...
trexxet's user avatar
  • 13
3 votes
1 answer
1k views

How to solve Z buffer artifacts

I am currently rendering a scene in the most standard fashion possible (triangle projection and Blinn-Phong for shading) However I am getting some artifacts: As you can see the lion head is not ...
Makogan's user avatar
  • 1,736
3 votes
1 answer
5k views

Replacing Vertex Attributes (glBufferData vs glBufferSubData)

I'm sending a large number of data to the vertex shader. I use glBufferData to generate my ...
Archmede's user avatar
  • 491
6 votes
3 answers
7k views

What is an OpenGL VAO in a nutshell?

Before I get downvoted. I am not asking how to use them, I know how to use them. I am trying to understand what they are. For example, an array is actually a contiguous section of memory, a linked ...
Makogan's user avatar
  • 1,736
1 vote
1 answer
687 views

Range of integers returned by glGenBuffers?

I'm developing a general Mesh class with the help of LearnOpenGL. In the example he creates a class which assumes that you want to generate a VAO, VBO, and an EBO but I don't usually use EBOs so I ...
Archmede's user avatar
  • 491
0 votes
1 answer
913 views

OpenGL back and front buffer - counting and adjusting the number of red pixels before displaying to screen

I'm writing a function that reads the number of red pixels on the left and right halves of the screen, it makes adjustments while the difference between the number of red pixels falls outside of a ...
Stackmm's user avatar
  • 89
4 votes
1 answer
505 views

Z buffer working in OpenGL

After Z-Buffer Testing does the fragment shader run on the discarded fragments? Does the Z-Test happen after the fragment shader runs? Please, tell me the step by step events that occur in the Z-Test....
VersesDev's user avatar
  • 129
3 votes
1 answer
1k views

Multiple buffers and calling glBufferSubData

In my project, for convenience I would like to use many buffers. Many buffers in my case means 50-100 terrain patches represented by buffers with vertex coordinates, normals, indices and maybe color. ...
remi000's user avatar
  • 240
5 votes
1 answer
5k views

How do double-buffers work in opengl?

As I understand, the back-buffer is used for rendering the image while the front-buffer is drawn on the screen. So if you have only one image to be drawn on the screen, then you only need to swap the ...
Adrian's user avatar
  • 677