mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
Readded Texturecompression-support
This commit is contained in:
parent
678b6faceb
commit
c3dd09cebf
|
@ -176,6 +176,16 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
|
|||
int Oglformat = TexFormatToOpenGLFormat(pCommand->m_Format);
|
||||
int StoreOglformat = TexFormatToOpenGLFormat(pCommand->m_StoreFormat);
|
||||
|
||||
if(pCommand->m_Flags&CCommandBuffer::TEXFLAG_COMPRESSED)
|
||||
{
|
||||
switch(StoreOglformat)
|
||||
{
|
||||
case GL_RGB: StoreOglformat = GL_COMPRESSED_RGB_ARB;
|
||||
case GL_ALPHA: StoreOglformat = GL_COMPRESSED_ALPHA_ARB;
|
||||
case GL_RGBA: StoreOglformat = GL_COMPRESSED_RGBA_ARB;
|
||||
default: StoreOglformat = GL_COMPRESSED_RGBA_ARB;
|
||||
}
|
||||
}
|
||||
glGenTextures(1, &m_aTextures[pCommand->m_Slot]);
|
||||
glBindTexture(GL_TEXTURE_2D, m_aTextures[pCommand->m_Slot]);
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ public:
|
|||
TEXFORMAT_ALPHA,
|
||||
|
||||
TEXFLAG_NOMIPMAPS = 1,
|
||||
TEXFLAG_COMPRESSED = 2,
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
Loading…
Reference in a new issue