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, 255, 255, 0, 0};
// What I would
//glDrawPixels(2, 2, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid*)pixels);
// What I am trying
GLuint pbo = 0;
glGenBuffers(1, &pbo);
glBindBuffer( GL_PIXEL_UNPACK_BUFFER, pbo);
glBufferData(GL_PIXEL_UNPACK_BUFFER, 12, a, GL_STREAM_DRAW);
// Blit pbo to back buffer, but how?
// Release all
....
Most tutorial[1] seem to copy the pixel buffer to a texture and then apply this texture to a quad, but this solution seem to perform lot of unnecessary operations: copy the data, create filtering for the texture, draw a quad (which mean a new VBO), etc...
Other answers[2] speak about "Blitting", but I am unable to get it working.
Also, most information about OpenGL still use glDrawPixels which is deprecated (and unavailable) for OpenGL 3.X.