ensure right internal image format, to prevent unsupported reformatting

This commit is contained in:
Jupeyy 2018-03-01 07:31:09 +01:00
parent 39cb6ad8b7
commit 3dabb5c2bd

View file

@ -902,7 +902,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Texture_Create(const CCommandBuffe
{
case GL_RGB: StoreOglformat = GL_COMPRESSED_RGB; break;
//this needs further checks. it seems on some gpus COMPRESSED_ALPHA isnt in the core profile
case GL_RED: StoreOglformat = GL_COMPRESSED_RGBA; break;
case GL_RED: StoreOglformat = GL_COMPRESSED_RED; break;
case GL_RGBA: StoreOglformat = GL_COMPRESSED_RGBA; break;
default: StoreOglformat = GL_COMPRESSED_RGBA;
}
@ -927,7 +927,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Texture_Create(const CCommandBuffe
//Bind the texture 2D.
GLint swizzleMask[] = {GL_ONE, GL_ONE, GL_ONE, GL_RED};
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzleMask);
StoreOglformat = GL_RGBA;
StoreOglformat = GL_R8;
}
if(pCommand->m_Flags&CCommandBuffer::TEXFLAG_NOMIPMAPS)