Working stencil buffer for the shield.

This commit is contained in:
Tleety
2016-02-04 14:33:39 +01:00
parent 379d211832
commit 7c582898f4
8 changed files with 41 additions and 32 deletions
+4 -4
View File
@@ -57,17 +57,17 @@ void FrameBuffer::Generate()
break;
}
if ((*it)->m_Attachment != GL_DEPTH_ATTACHMENT) {
if ((*it)->m_Attachment != GL_DEPTH_ATTACHMENT || (*it)->m_Attachment != GL_STENCIL_ATTACHMENT || (*it)->m_Attachment != GL_DEPTH_STENCIL_ATTACHMENT) {
attachments.push_back((*it)->m_Attachment);
}
}
GLenum* bufferTextures = &attachments[0];
glDrawBuffers(attachments.size(), bufferTextures);
if (GLenum frameBufferStatus = glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
LOG_ERROR("FrameBuffer incomplete: 0x%x\n", frameBufferStatus);
GLERROR("Framebuffer incomplete");
//LOG_ERROR("FrameBuffer incomplete: 0x%x\n", frameBufferStatus);
exit(EXIT_FAILURE);
}
}