Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Multiple OpenGL error messages  (Read 2013 times)

0 Members and 1 Guest are viewing this topic.

Aleios

  • Newbie
  • *
  • Posts: 2
    • View Profile
Multiple OpenGL error messages
« on: July 20, 2013, 02:02:57 pm »
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.
« Last Edit: July 20, 2013, 02:44:15 pm by Aleios »

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Multiple OpenGL error messages
« Reply #1 on: July 20, 2013, 04:16:54 pm »
Does it work with wnd.pushGLStates(); and wnd.popGLStates(); instead of wnd.resetGLStates() and push/pop attrib/clientAttrib?

Aleios

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Multiple OpenGL error messages
« Reply #2 on: July 20, 2013, 04:33:35 pm »
Nope. I believe that function calls resetGLStates internally anyway. It may actually have something to do with sfgui now that I think about it. Ever since I added in sfgui this specific message pops up. Yet it could just be that I added some line of code that it doesn't like.

I took at look inside TextureSaver.cpp and it doesn't look like any function by itself in there could be a cause. It has to be something related to the texture binding at that stage or something.