<p>The following code writes no data to the back buffer on Intel integrated video cards,for example, on a MacBook. On ATI cards, such as in the iMac, it draws to the back buffer. The width and height are correct (and 800x600 buffer) and m_PixelBuffer is correctly filled with 0xAA00AA00.</p>

<p>My best guess so far is that there is something amiss with needing glWindowPos set. I do not currently set it (or the raster position), and when I get GL_CURRENT_RASTER_POSITION I noticed that the default on the ATI card is 0,0,0,0 and the Intel it's 0,0,0,1. When I set the raster pos on the ATI card to 0,0,0,1 I get the same result as the Intel card, nothing drawn to the back buffer. Is there some transform state I'm missing? This is a 2D application so the view transform is a very simple glOrtho.</p>

<pre><code>glDrawPixels(GetBufferWidth(), GetBufferHeight(), GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, m_PixelBuffer);
</code></pre>

<p>Any more info I can provide, please ask. I'm pretty much an OpenGL and Mac newb so I don't know if I'm providing enough information.</p>

[{'answer_id': 25864, 'author': 'basszero', 'author_id': 287, 'author_profile': 'https://Stackoverflow.com/users/287', 'pm_score': 2, 'selected': False, 'text': '<p>I\'ve always had problems with OpenGL implementations from Intel, though I\'m not sure that\'s your problem this time. I think you\'re running into some byte-order issues. Give this a read and feel free to experiment with different constants for packing and color order.</p>\n\n<p><a href="http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/chapter_5_section_25.html" rel="nofollow noreferrer">http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/chapter_5_section_25.html</a></p>\n\n<p>I know it\'s OSX guide, you can probably find similar OpenGL articles on other sites for other platforms. This should be applicable.</p>\n'}, {'answer_id': 26482, 'author': 'Chris Blackwell', 'author_id': 1329401, 'author_profile': 'https://Stackoverflow.com/users/1329401', 'pm_score': 1, 'selected': False, 'text': '<blockquote>\n  <p>I\'ve always had problems with OpenGL\n  implementations from Intel</p>\n</blockquote>\n\n<p>This is kind of what I\'m worried about, but I have a hard time believing they\'d screw up something as basic as glDrawPixels, and also, since I can "duplicate" the problem by changing the raster position vector, it makes me think it\'s my fault and I\'m missing something basic.</p>\n\n<blockquote>\n  <p>I think you\'re running into some\n  byte-order issues</p>\n</blockquote>\n\n<p>That was my first inclination, and I\'ve tried packing differently, with no result. I also tried packing the buffer with values that would present a usable alpha if swizzled, with no result. This is why I\'m barking up the raster pos tree, but I\'m still honestly not 100% sure. Note that I\'m targeting only Intel Macs if that makes a difference.</p>\n\n<p>Thanks for the link, it was a good read, and good to tuck away for future reference. I\'d upmod but I can\'t until I get 3 more rep points :)</p>\n'}, {'answer_id': 29549, 'author': 'Ashwin Nanjappa', 'author_id': 1630, 'author_profile': 'https://Stackoverflow.com/users/1630', 'pm_score': 1, 'selected': False, 'text': "<p>It's highly unlikely that a basic function like <strong>glDrawPixels</strong> might not be working. Have you tried some really simple settings like <strong>GL_RGB</strong> or <strong>GL_RGBA</strong> for format and <strong>GL_UNSIGNED_BYTE</strong> or <strong>GL_FLOAT</strong> for type? If not, can you share with us the smallest possible program which replicates your problem?</p>\n"}, {'answer_id': 154444, 'author': 'Adrian', 'author_id': 23624, 'author_profile': 'https://Stackoverflow.com/users/23624', 'pm_score': 1, 'selected': False, 'text': '<p>The default raster position should be (0,0,0,1), but you can reset it to make sure.</p>\n\n<p>Just before calling glDrawPixels(), try </p>\n\n<pre><code>GLint valid;\nglGet(GL_CURRENT_RASTER_POSITION_VALID, &amp;valid);\n</code></pre>\n\n<p>This should tell you if the current raster position is valid.  If it is, then this is not your problem.</p>\n'}]
['https://Stackoverflow.com/questions/25646', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1329401/']