mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
ensure right internal image format, to prevent unsupported reformatting
This commit is contained in:
parent
39cb6ad8b7
commit
3dabb5c2bd
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue