5 Replies Latest reply on Jun 28, 2017 10:48 AM by asylum29

    glClearBufferfv throws GL_INVALID_VALUE

    asylum29

      I'm trying to clear color attachments of a framebuffer separately, but glClearBufferfv() throws an error when it shouldn't:

       

      float black[] = { 0, 0, 0, 1 };

      float white[] = { 1, 1, 1, 1 };

       

      glClearBufferfv(GL_COLOR, GL_DRAW_BUFFER0, black); // error

      glClearBufferfv(GL_COLOR, GL_DRAW_BUFFER1, white); // error

      glClearBufferfv(GL_DEPTH, 0, white); // ok

       

      Card is R7 360, latest driver.
      CodeXL call stack:

       

      glBindFramebuffer(GL_FRAMEBUFFER, 3)

      glDrawBuffers(2, {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1})

      glViewport(0, 0, 1360, 768)

      glClearBufferfv(GL_COLOR, 34853, 0x0028F528)

       

      CodeXL - OpenGL Error: glClearBufferfv - GL_INVALID_VALUE