- minor bug fix

This commit is contained in:
Magnus Norddahl 2019-08-15 02:57:09 +02:00
parent a542385cd7
commit 10c06cc662

View file

@ -53,7 +53,7 @@ void Texture::Invalidate()
if (mFramebuffer) glDeleteFramebuffers(1, &mFramebuffer);
if (mFramebufferDepth) glDeleteFramebuffers(1, &mFramebufferDepth);
if (mTexture) glDeleteTextures(1, &mTexture);
mTexture = 0;
mDepthRenderbuffer = 0;
mFramebuffer = 0;
mFramebufferDepth = 0;
mTexture = 0;
@ -129,7 +129,7 @@ GLuint Texture::GetFramebuffer(bool usedepthbuffer)
glGenFramebuffers(1, &mFramebuffer);
glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer);
glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texture, 0);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer);
}
return mFramebufferDepth;
}