Readded Texturecompression-support

This commit is contained in:
BeaR 2012-08-27 18:58:30 +02:00 committed by oy
parent d23a1247aa
commit 056309ac5e
2 changed files with 11 additions and 0 deletions

View file

@ -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]);

View file

@ -94,6 +94,7 @@ public:
TEXFORMAT_ALPHA,
TEXFLAG_NOMIPMAPS = 1,
TEXFLAG_COMPRESSED = 2,
};
enum