glGetError returned "invalid frame buffer operation" after glGenBuffers(1,&vbo). vbo has a valid value of 1 after glGenBuffers
So what could be the problem?
Thanks
invalid framebuffer operation
That makes no sense, I can't understand any reason why that would throw that error. Are you positive that there are no error before glGenBuffers?
That makes no sense, I can't understand any reason why that would throw that error. Are you positive that there are no error before glGenBuffers?
I found the error before glGenBuffers which makes me more confused: the error occurred right after glClear(GL_COLOR__BUFFER_BIT|GL_DEPTH_BUFFER_BIT). I've never seen this problem before.
The following is my OpenGL initialization code:
GLenum err = glewInit();
glClearColor(0.8, 0.8, 0.8 1.0);
glClearDepth(1.0);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
err = glGetError();
if( err != GL_NO_ERROR)
qDebug("Initialize GL: %s", gluErrorString(err));
glEnable(GL_DEPTH_TEST);
glEnable(GL_COLOR_MATERIAL);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
// setup lighting
.....
// create VBO
glGenBuffers(1, &m_coordsVBO);
glGenBuffers(1, &m_normalsVBO);
glGenBuffers(1, &m_indicesVBO);
Most likely you have an error in framebuffer creation so when you try to clear the buffer(s) GL throws an error.
Did you check your framebuffer status (ie. if the status is GL_FRAMEBUFFER_COMPLETE)?
Did you check your framebuffer status (ie. if the status is GL_FRAMEBUFFER_COMPLETE)?
GLuint status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
Most likely you have an error in framebuffer creation so when you try to clear the buffer(s) GL throws an error.
Did you check your framebuffer status (ie. if the status is GL_FRAMEBUFFER_COMPLETE)?
GLuint status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
You are right, the status is not GL_FRAMEBUFFER_COMPLETE.
What could cause this problem?
P.S., My development machine is a MacBook Pro running Mac OS X Lion
Thanks
Have you tested it on another machine? Windows perhaps.
If it works on one and it doesn't on the other, there is something wrong with the driver of one of the machines that creates that difference.
If it works on one and it doesn't on the other, there is something wrong with the driver of one of the machines that creates that difference.
What does the status return? (ex. GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT....etc)
It could be a mistake in the framebuffer creation code (I don't think an MBP with Lion should have any issues with driver / framebuffers).
It could be a mistake in the framebuffer creation code (I don't think an MBP with Lion should have any issues with driver / framebuffers).
What does the status return? (ex. GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT....etc)
It could be a mistake in the framebuffer creation code (I don't think an MBP with Lion should have any issues with driver / framebuffers).
The status returned GL_FRAMEBUFFER_UNDEFINED.
Have you tested it on another machine? Windows perhaps.
If it works on one and it doesn't on the other, there is something wrong with the driver of one of the machines that creates that difference.
Thanks. I'll try what you suggested.
[quote name='V-man' timestamp='1314029473' post='4852364']
Have you tested it on another machine? Windows perhaps.
If it works on one and it doesn't on the other, there is something wrong with the driver of one of the machines that creates that difference.
Thanks. I'll try what you suggested.
[/quote]
glCheckFramebufferStatus does not return any error when I run the test program on the Windows 7 virtual machine on my MBP.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement