diff options
| author | BeaR <cinaera@web.de> | 2012-08-27 18:58:30 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2013-02-24 18:01:58 +0100 |
| commit | c3dd09cebfeca29a33ab77dfcfb27ec7a64a9687 (patch) | |
| tree | 41f9e03d6f8259e128eaea1f7ae456d8dc11a0c1 /src | |
| parent | 678b6faceb8f8bd550de32b8fe59f7c34e2a3172 (diff) | |
| download | zcatch-c3dd09cebfeca29a33ab77dfcfb27ec7a64a9687.tar.gz zcatch-c3dd09cebfeca29a33ab77dfcfb27ec7a64a9687.zip | |
Readded Texturecompression-support
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/client/backend_sdl.cpp | 10 | ||||
| -rw-r--r-- | src/engine/client/graphics_threaded.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 22c48e53..7fa1db77 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -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]); diff --git a/src/engine/client/graphics_threaded.h b/src/engine/client/graphics_threaded.h index 5c15d062..e482f6e5 100644 --- a/src/engine/client/graphics_threaded.h +++ b/src/engine/client/graphics_threaded.h @@ -94,6 +94,7 @@ public: TEXFORMAT_ALPHA, TEXFLAG_NOMIPMAPS = 1, + TEXFLAG_COMPRESSED = 2, }; enum |