From 4a55a04e18273324ef9487d1deb7174692b9d5bb Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 9 May 2018 21:24:42 -1000 Subject: [PATCH] Use GL_DEPTH_COMPONENT32F for consistency with other backends --- lib/graphicsdev/GL.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/graphicsdev/GL.cpp b/lib/graphicsdev/GL.cpp index bc69e9c..15e8071 100644 --- a/lib/graphicsdev/GL.cpp +++ b/lib/graphicsdev/GL.cpp @@ -600,14 +600,14 @@ public: glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, m_texs[0]); glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, m_samples, m_colorFormat, width, height, GL_FALSE); glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, m_texs[1]); - glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, m_samples, GL_DEPTH_COMPONENT24, width, height, GL_FALSE); + glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, m_samples, GL_DEPTH_COMPONENT32F, width, height, GL_FALSE); } else { glBindTexture(GL_TEXTURE_2D, m_texs[0]); glTexImage2D(GL_TEXTURE_2D, 0, m_colorFormat, width, height, 0, GL_RGBA, compType, nullptr); glBindTexture(GL_TEXTURE_2D, m_texs[1]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); glBindFramebuffer(GL_FRAMEBUFFER, m_fbo); glDepthMask(GL_TRUE); @@ -628,7 +628,7 @@ public: if (m_bindTexs[1][i]) { glBindTexture(GL_TEXTURE_2D, m_bindTexs[1][i]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); } } } @@ -1820,7 +1820,7 @@ GLTextureR::GLTextureR(const ObjToken& parent, GLCommandQueue* glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, m_texs[0]); glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, samples, colorFormat, width, height, GL_FALSE); glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, m_texs[1]); - glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, samples, GL_DEPTH_COMPONENT24, width, height, GL_FALSE); + glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, samples, GL_DEPTH_COMPONENT32F, width, height, GL_FALSE); } else { @@ -1831,7 +1831,7 @@ GLTextureR::GLTextureR(const ObjToken& parent, GLCommandQueue* glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glBindTexture(GL_TEXTURE_2D, m_texs[1]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); } for (int i=0 ; i& parent, GLCommandQueue* for (int i=0 ; i