mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Allow generating texture mip maps.
This commit is contained in:
parent
d131f22354
commit
42aeece7fd
@ -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 );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ void* MakeTexture( bool zigzag = false );
|
||||
void FreeTexture( void* tex, void(*runOnMainThread)(const std::function<void()>&, 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 );
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user