mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 05:03:53 +00:00
Frame images are now ETC1 compressed.
This commit is contained in:
parent
a654b642ef
commit
42a30bffe1
@ -25,7 +25,7 @@ void UpdateTexture( void* _tex, const char* data, int w, int h )
|
|||||||
{
|
{
|
||||||
auto tex = (GLuint)_tex;
|
auto tex = (GLuint)_tex;
|
||||||
glBindTexture( GL_TEXTURE_2D, tex );
|
glBindTexture( GL_TEXTURE_2D, tex );
|
||||||
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data );
|
glCompressedTexImage2D( GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB8_ETC2, w, h, 0, w * h / 2, data );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1248,7 +1248,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
s_loadProgress.subProgress.store( i, std::memory_order_relaxed );
|
s_loadProgress.subProgress.store( i, std::memory_order_relaxed );
|
||||||
auto fi = m_slab.Alloc<FrameImage>();
|
auto fi = m_slab.Alloc<FrameImage>();
|
||||||
f.Read2( fi->w, fi->h );
|
f.Read2( fi->w, fi->h );
|
||||||
const auto sz = fi->w * fi->h * 4;
|
const auto sz = fi->w * fi->h / 2;
|
||||||
auto ptr = (char*)m_slab.AllocBig( sz );
|
auto ptr = (char*)m_slab.AllocBig( sz );
|
||||||
f.Read( ptr, sz );
|
f.Read( ptr, sz );
|
||||||
fi->ptr = ptr;
|
fi->ptr = ptr;
|
||||||
@ -4326,7 +4326,7 @@ void Worker::Write( FileWrite& f )
|
|||||||
{
|
{
|
||||||
f.Write( &fi->w, sizeof( fi->w ) );
|
f.Write( &fi->w, sizeof( fi->w ) );
|
||||||
f.Write( &fi->h, sizeof( fi->h ) );
|
f.Write( &fi->h, sizeof( fi->h ) );
|
||||||
f.Write( fi->ptr, fi->w * fi->h * 4 );
|
f.Write( fi->ptr, fi->w * fi->h / 2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user