[Mesa-dev] [Bug 13978] [Mesa core] glGetIntegerv(GL_DRAW_BUFFER0) returns wrong buffer enum

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jul 23 03:17:10 PDT 2015


--- Comment #7 from Samuel Iglesias <siglesias at igalia.com> ---
(In reply to Benjamin Botwin from comment #6)
> GL_DRAW_BUFFER0 returns 1029 instead of GL_BACK_LEFT

I test it and I have not found anything wrong in Mesa. The initial value for
double-buffered contexts is GL_BACK.
   * See: https://www.opengl.org/sdk/docs/man4/html/glDrawBuffer.xhtml
   * Also see: https://www.opengl.org/sdk/docs/man2/xhtml/glGet.xml Search for

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 https://www.opengl.org/sdk/docs/man3/xhtml/glClearBuffer.xml

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150723/3fb00d42/attachment.html>

More information about the mesa-dev mailing list