Hey there guys I have been using SFML as a window manager for my OpenGL programs for some time now and this is the first time that I have seen my std::cout being spammed with messages such as:
"An internal OpenGL call failed in TextureSaver.cpp (38) : GL_INVALID_OPERATION"
and the same in RenderTarget.cpp (285). The second error is occurring and spamming my console after I call resetGLStates() under glPushAttrib(...) and above glPopAttrib().
This is all called after rendering to an FBO then dumping their contents onto the screen via a Shader and a quad built in a VBO.
I thought that maybe I still had something bound that could conflict so I unbound all my textures, FBO, VBO, etc. right before I begin SFML/SFGUI rendering and still had no luck.From what I can see everything is still actually rendering just fine so I am really confused as to what could be causing this.
For reference this is the part that causes issues.
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Shader binds
// FBO Rendering
// Screen Rendering, etc.
glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS);
wnd.resetGLStates();
sfgui.Display(wnd);
glPopClientAttrib();
glPopAttrib();
wnd.display();
Please tell me if you require more information. There is a lot of code in this project so if it is needed I shall try to compress it down to as minimal as I can possibly get.
Thanks guys.
EDIT: After a bit of tweaking I have got rid of the issue with render target. My FBO stencil renderbuffer was not being unbound due to an unreachable section of code (my foolish mistake). I'm still kind of curious as to what that had to do with resetGLStates though. The internal call in TextureSaver.cpp is still existent too.