问题: glCheckFramebufferStatus 返回的值(36062)与任何记录的常量都不匹配。
我正在尝试创建一个帧缓冲区对象,然后检查它的状态,但是 glCheckFramebufferStatus 返回一个与任何常量都不匹配的值。
难道我做错了什么?到目前为止,所有其他命令都有效。
代码(闪电战):
glGenFramebuffers(1, Varptr gl_Framebuffer)
glGenTextures(1, Varptr gl_FramebufferTex)
glBindTexture(GL_TEXTURE_2D, gl_FramebufferTex)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, vRW, vRH, 0, GL_RGB, GL_UNSIGNED_BYTE, 0)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glBindFramebuffer(GL_FRAMEBUFFER, gl_Framebuffer)
glFramebufferTextureARB(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, gl_FramebufferTex, 0)
glFramebufferTextureARB(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, gl_FramebufferTex, 0)
Local fbo0Status:Int = glCheckFramebufferStatus(gl_Framebuffer)
Select fbo0Status
Case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
Print "[FBO0] GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"
...
Default
Print "[FBO0] GL_I_DONT_KNOW_THIS_FREAKING_VALUE (" + fbo0Status + ")"
EndSelect