<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - [Mesa core] glGetIntegerv(GL_DRAW_BUFFER0) returns wrong buffer enum"
href="https://bugs.freedesktop.org/show_bug.cgi?id=13978#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - [Mesa core] glGetIntegerv(GL_DRAW_BUFFER0) returns wrong buffer enum"
href="https://bugs.freedesktop.org/show_bug.cgi?id=13978">bug 13978</a>
from <span class="vcard"><a class="email" href="mailto:siglesias@igalia.com" title="Samuel Iglesias <siglesias@igalia.com>"> <span class="fn">Samuel Iglesias</span></a>
</span></b>
<pre>(In reply to Benjamin Botwin from <a href="show_bug.cgi?id=13978#c6">comment #6</a>)
<span class="quote">> GL_DRAW_BUFFER0 returns 1029 instead of GL_BACK_LEFT</span >
I test it and I have not found anything wrong in Mesa. The initial value for
double-buffered contexts is GL_BACK.
* See: <a href="https://www.opengl.org/sdk/docs/man4/html/glDrawBuffer.xhtml">https://www.opengl.org/sdk/docs/man4/html/glDrawBuffer.xhtml</a>
* Also see: <a href="https://www.opengl.org/sdk/docs/man2/xhtml/glGet.xml">https://www.opengl.org/sdk/docs/man2/xhtml/glGet.xml</a> Search for
GL_DRAW_BUFFER.
Furthermore, glClearBuffer() doc says the following:
"If buffer is GL_COLOR, a particular draw buffer GL_DRAW_BUFFERi
is specified by passing i as drawBuffer."
As a second parameter of glClearbuffer(), you are passing the value got from
glGetIntegeriv() which is wrong. For GL_DRAW_BUFFER0, you should pass a 0. If
you do that, the window is cleared with red color once we swap buffers.
* See <a href="https://www.opengl.org/sdk/docs/man3/xhtml/glClearBuffer.xml">https://www.opengl.org/sdk/docs/man3/xhtml/glClearBuffer.xml</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>