diff --git a/server/TracyTexture.cpp b/server/TracyTexture.cpp index 66defd93..c5ca58cf 100644 --- a/server/TracyTexture.cpp +++ b/server/TracyTexture.cpp @@ -39,14 +39,14 @@ void InitTexture() #endif } -void* MakeTexture() +void* MakeTexture( bool zigzag ) { GLuint tex; glGenTextures( 1, &tex ); glBindTexture( GL_TEXTURE_2D, tex ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, zigzag ? GL_LINEAR_MIPMAP_LINEAR : GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, zigzag ? GL_REPEAT : GL_CLAMP_TO_EDGE ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); return (void*)(intptr_t)tex; } diff --git a/server/TracyTexture.hpp b/server/TracyTexture.hpp index cc2f9160..553e867f 100644 --- a/server/TracyTexture.hpp +++ b/server/TracyTexture.hpp @@ -7,7 +7,7 @@ namespace tracy { void InitTexture(); -void* MakeTexture(); +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 );