I am creating a framebuffer in LWJGL using:
framebuffer = glGenFramebuffers();
texture = glGenTextures();
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
glBindTexture(GL_TEXTURE_2D, texture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 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);
glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texture, 0);
glDrawBuffers(GL_COLOR_ATTACHMENT0);
But glCheckFramebufferStatus
tells me that the attachment is incomplete. What am I doing wrong? I checked several websites and I don't seem to be missing anything...?