mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-15 15:49:46 +00:00
Perform OpenGL texture cleanup only on main thread.
This commit is contained in:
@@ -21,10 +21,10 @@ void* MakeTexture()
|
||||
return (void*)(intptr_t)tex;
|
||||
}
|
||||
|
||||
void FreeTexture( void* _tex )
|
||||
void FreeTexture( void* _tex, void(*runOnMainThread)(std::function<void()>) )
|
||||
{
|
||||
auto tex = (GLuint)(intptr_t)_tex;
|
||||
glDeleteTextures( 1, &tex );
|
||||
runOnMainThread( [tex] { glDeleteTextures( 1, &tex ); } );
|
||||
}
|
||||
|
||||
void UpdateTexture( void* _tex, const char* data, int w, int h )
|
||||
|
||||
Reference in New Issue
Block a user