Hi, I recently encountered a problem when trying to run my codes on another computer. I got glCheckFramebufferStatus() return 0 but didn’t get any error code from glGetError().
The codes work totally fine on my computer (with nvidia driver 418.56) but not on the current one (nvidia driver 450.51.06). Is that safe to say this is a driver issue?
BTW, both opengl versions are 4.6.0
Here’s the code snippet:
glGenFramebuffers(1, &f.FBO);
glGenRenderbuffers(1, &f.color_buf);
glGenRenderbuffers(1, &f.depth_buf);
glBindRenderbuffer(GL_RENDERBUFFER, f.color_buf);
glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA8, w, h);
glBindRenderbuffer(GL_RENDERBUFFER, f.depth_buf);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, w, h);
glBindFramebuffer(GL_FRAMEBUFFER, f.FBO);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, f.color_buf);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, f.depth_buf);
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE)
std::cout << "create frame buffer fail!" << std::endl;
glBindFramebuffer(GL_FRAMEBUFFER, 0);
Feel free to give me some directions. Thanks for anything!