From 1a87d75efe54eba34991b97a10ddd84a85994cfa Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Fri, 27 Jan 2017 22:39:34 +0700 Subject: [PATCH] Correct internal texture formats. --- .../opengl_BufferManipulationObjectFactory.cpp | 6 +++--- src/Graphics/OpenGLContext/opengl_Parameters.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Graphics/OpenGLContext/opengl_BufferManipulationObjectFactory.cpp b/src/Graphics/OpenGLContext/opengl_BufferManipulationObjectFactory.cpp index 5e66e757..52c7d373 100644 --- a/src/Graphics/OpenGLContext/opengl_BufferManipulationObjectFactory.cpp +++ b/src/Graphics/OpenGLContext/opengl_BufferManipulationObjectFactory.cpp @@ -444,17 +444,17 @@ struct FramebufferTextureFormatsOpenGL : public graphics::FramebufferTextureForm protected: void init() override { - colorInternalFormat = GL_RGBA; + colorInternalFormat = GL_RGBA8; colorFormat = GL_RGBA; colorType = GL_UNSIGNED_BYTE; colorFormatBytes = 4; - monochromeInternalFormat = GL_RED; + monochromeInternalFormat = GL_R8; monochromeFormat = GL_RED; monochromeType = GL_UNSIGNED_BYTE; monochromeFormatBytes = 1; - depthInternalFormat = GL_DEPTH_COMPONENT; + depthInternalFormat = GL_DEPTH_COMPONENT24; depthFormat = GL_DEPTH_COMPONENT; depthType = GL_FLOAT; depthFormatBytes = 4; diff --git a/src/Graphics/OpenGLContext/opengl_Parameters.cpp b/src/Graphics/OpenGLContext/opengl_Parameters.cpp index 795aa625..81b73ab8 100644 --- a/src/Graphics/OpenGLContext/opengl_Parameters.cpp +++ b/src/Graphics/OpenGLContext/opengl_Parameters.cpp @@ -17,7 +17,7 @@ namespace graphics { Parameter RGB5_A1(GL_RGB5_A1); Parameter RG(GL_RG8); Parameter RED(GL_R8); - Parameter DEPTH(GL_DEPTH_COMPONENT); + Parameter DEPTH(GL_DEPTH_COMPONENT24); Parameter RG32F(GL_RG32F); }