Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-06-27 18:16:23 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-06-27 20:14:51 +0300
commit10bcc8c770add4ecc687e01e35a06794b66f2945 (patch)
tree0622763109dbee145d237233b35be6882d3771f2 /server/TracyTexture.cpp
parent1939c311658dd8fa88ef474c7766bace8a2e9521 (diff)
Switch to DXT1 textures in profiler utility.
Diffstat (limited to 'server/TracyTexture.cpp')
-rw-r--r--server/TracyTexture.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/TracyTexture.cpp b/server/TracyTexture.cpp
index a99bd14d..af2bb87f 100644
--- a/server/TracyTexture.cpp
+++ b/server/TracyTexture.cpp
@@ -2,6 +2,10 @@
#include "TracyTexture.hpp"
+#ifndef COMPRESSED_RGB_S3TC_DXT1_EXT
+# define COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#endif
+
namespace tracy
{
@@ -21,11 +25,11 @@ void FreeTexture( void* _tex )
glDeleteTextures( 1, &tex );
}
-void UpdateTexture( void* _tex, const char* data, int w, int h )
+void UpdateTexture( void* _tex, const char* data, int w, int h, bool etc )
{
auto tex = (GLuint)(intptr_t)_tex;
glBindTexture( GL_TEXTURE_2D, tex );
- glCompressedTexImage2D( GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB8_ETC2, w, h, 0, w * h / 2, data );
+ glCompressedTexImage2D( GL_TEXTURE_2D, 0, etc ? GL_COMPRESSED_RGB8_ETC2 : COMPRESSED_RGB_S3TC_DXT1_EXT, w, h, 0, w * h / 2, data );
}
}