opengl: interop: drain error in texture test
The code is used to detect whether we can allocated the texture, and is especially designed to handle Apple hardware which should supposedly support 16bit textures but actually fails during the TexImage2D allocation call on most Apple OpenGL/ES implementations. Because it was stacking OpenGL errors, the GL_ASSERT_NOERROR macro would trigger when enabled, though it should have been silenced into interop failure instead. Drain the errors from the OpenGL error stack and return a failure. For sanity purpose, also assert that there were no errors before this function so that debug build don't silently drain errors from the outside.
Loading
Please register or sign in to comment