diff --git a/server/TracyTexture.cpp b/server/TracyTexture.cpp index c5ca58cf..f4e98125 100644 --- a/server/TracyTexture.cpp +++ b/server/TracyTexture.cpp @@ -174,4 +174,11 @@ void UpdateTextureRGBA( void* _tex, void* data, int w, int h ) glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data ); } +void MakeMipMaps( void* _tex ) +{ + auto tex = (GLuint)(intptr_t)_tex; + glBindTexture( GL_TEXTURE_2D, tex ); + glGenerateMipmap( GL_TEXTURE_2D ); +} + } diff --git a/server/TracyTexture.hpp b/server/TracyTexture.hpp index 553e867f..daeba087 100644 --- a/server/TracyTexture.hpp +++ b/server/TracyTexture.hpp @@ -11,6 +11,7 @@ void* MakeTexture( bool zigzag = false ); void FreeTexture( void* tex, void(*runOnMainThread)(const std::function&, bool) ); void UpdateTexture( void* tex, const char* data, int w, int h ); void UpdateTextureRGBA( void* tex, void* data, int w, int h ); +void MakeMipMaps( void* tex ); }