diff --git a/server/TracyTexture.cpp b/server/TracyTexture.cpp index 8e4a9e63..8bc6f465 100644 --- a/server/TracyTexture.cpp +++ b/server/TracyTexture.cpp @@ -35,4 +35,11 @@ void UpdateTexture( void* _tex, const char* data, int w, int h ) glCompressedTexImage2D( GL_TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, w, h, 0, w * h / 2, data ); } +void UpdateTextureRGBA( void* _tex, void* data, int w, int h ) +{ + auto tex = (GLuint)(intptr_t)_tex; + glBindTexture( GL_TEXTURE_2D, tex ); + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data ); +} + } diff --git a/server/TracyTexture.hpp b/server/TracyTexture.hpp index 24cdab69..128834da 100644 --- a/server/TracyTexture.hpp +++ b/server/TracyTexture.hpp @@ -9,6 +9,7 @@ namespace tracy void* MakeTexture(); void FreeTexture( void* tex, void(*runOnMainThread)(std::function, bool) ); void UpdateTexture( void* tex, const char* data, int w, int h ); +void UpdateTextureRGBA( void* tex, void* data, int w, int h ); }