From 243e186ba20f76b7a98519d31e50bf606d9c3132 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Mon, 4 May 2015 15:52:45 +0600 Subject: [PATCH] Correct internal format for DepthBufferToRDRAM color texture. --- src/FrameBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index 682e8519..2b517b55 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -1040,7 +1040,7 @@ void DepthBufferToRDRAM::Init() textureCache().addFrameBufferTextureSize(m_pDepthTexture->textureBytes); glBindTexture( GL_TEXTURE_2D, m_pColorTexture->glName ); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, m_pColorTexture->realWidth, m_pColorTexture->realHeight, 0, GL_RED, GL_UNSIGNED_BYTE, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, m_pColorTexture->realWidth, m_pColorTexture->realHeight, 0, GL_RED, GL_UNSIGNED_BYTE, NULL); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );