opengl Framebuffer is incomplete: No attachments and default size is zero 问题解决

GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomplete: No attachments and default size is zero. 这个framebuffer错误的一个原因是: 

void glFramebufferTexture2D(
    GLenum target,
 	GLenum attachment,
 	GLenum textarget,
 	GLuint texture,
 	GLint level
);

上面所示的 glFramebufferTexture2D 函数的中的参数  texture 是个无效值例如0或者nullptr。

这个错误可能是有些代码逻辑被无意修改了之后导致的。

你可能感兴趣的:(3d,c++)