OpenGL invalid framebuffer operation after glClear(GL_COLOR_BUFFER_BIT);

后端 未结 2 1313
慢半拍i
慢半拍i 2021-01-05 02:36

Every time after I call glClear(GL_COLOR_BUFFER_BIT);, I get the OpenGL error \"invalid framebuffer operation\".

The call seems to work just fine, and n

2条回答
  •  耶瑟儿~
    2021-01-05 03:06

    My best guess is that your framebuffer is not complete and calling glClear on an incomplete framebuffer is throwing the error.

    Check the status of the framebuffer using glCheckFramebufferStatus and make sure it returns GL_FRAMEBUFFER_COMPLETE.

提交回复
热议问题