"Fix" alpha blending in framebuffer

This commit is contained in:
Peder Bergebakken Sundt 2019-04-02 23:26:02 +02:00
parent 355aa1d62d
commit b6f053466d
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,8 @@ void initRenderer(GLFWwindow* window, int windowWidth, int windowHeight) {
GLenum drawBuffers[] = {GL_COLOR_ATTACHMENT0}; GLenum drawBuffers[] = {GL_COLOR_ATTACHMENT0};
glDrawBuffers(1, drawBuffers); glDrawBuffers(1, drawBuffers);
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
std::cerr << (glCheckFramebufferStatus(GL_FRAMEBUFFER)) << endl; std::cerr << (glCheckFramebufferStatus(GL_FRAMEBUFFER)) << endl;
throw 1; throw 1;