   framebuffer glGetError help
  HiI'm trying to get a multisampled framebuffer object to work. I'm using code from http://blog.dexta.ch/2008/08/27/gl_ext_framebuffer_object-with-multisampling/.I used a function to call glGetError() and put it everywhere to try and track down what wasn't working. I'm trying to draw a simple triangle to the screen, and without using msfb it works fine, like normal. And the code to set up the msfb doesn't throw an error so I hope that's all good.But I get a GL_INVALID_FRAMEBUFFER_OPERATION_EXT error from this code:void render(float dt){  if (multisampledFrameBufferEnabled){    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, multisampledFrameBuffer);    GL_ERROR();    glPushAttrib(GL_VIEWPORT_BIT);    glViewport(0, 0, screenBufferWidth, screenBufferHeight);    GL_ERROR();  }  glColor3f(1, 1, 1);  glBegin(GL_TRIANGLES);  {  GL_ERROR();  {    glVertex3f(1, 1.5, 0);    glVertex3f(0, 0, 0);    glVertex3f(0, 1, 0);  }  glEnd();  if (multisampledFrameBufferEnabled){    glPopAttrib();    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);    GL_ERROR();the render function goes on for a while after that but this last line is where things get screwy.I can post the whole code if someone can spare a moment but it's a lot, and hopefully it's an obvious error that I just don't understand.Thanks for your help![Edited by - whiterook6 on April 6, 2010 8:20:02 PM]
  It is illegal to call glGetError between glBegin/glEnd (generates GL_INVALID_OPERATION), so get rid of that first of all.glGetErrorAlso you should find out which glGetError in your code is reporting the error.   ;  It's the last GL_ERROR() there, belowglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);I suppose my question is once I've drawn to this msfb, how do I draw the buffer to the screen? The code on that website says to do a blit, but that's only from buffer to buffer, right? Do I have to set the msfb as a texture and render a full screen polygon?   ;  Well you definitely need to remove the glError() between the glBegin() and glEnd(). And yes, you will need to draw a full-screen quad (or however size you want) and use the framebuffer as a texture.   