The following code does not write data to the rear buffer of Intel integrated video cards, for example, on a MacBook. On ATI cards, such as the iMac, it accesses the back buffer. The width and height are correct (and the buffer is 800x600), and the m_PixelBuffer is correctly filled with 0xAA00AA00.
My best guess is that there is something amiss with the need to install glWindowPos. I do not currently set it (or raster position), and when I get GL_CURRENT_RASTER_POSITION, I noticed that the default value on the ATI card is 0,0,0,0, and Intel - 0,0,0,1. When I set the raster pose on the ATI card to 0,0,0,1, I get the same result as the Intel card, nothing accesses the feedback buffer. Is there some kind of transformation state that I am missing? This is a 2D application, so view conversion is very simple glOrtho.
glDrawPixels(GetBufferWidth(), GetBufferHeight(), GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, m_PixelBuffer);
For more information I can provide, please ask. I'm pretty much OpenGL and Mac newb, so I don't know if I am providing enough information.
source
share