mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Load custom mip chain for zigzags.
This commit is contained in:
+16
-7
@@ -45,7 +45,12 @@
|
||||
#include "../../server/IconsFontAwesome6.h"
|
||||
|
||||
#include "icon.hpp"
|
||||
#include "zigzag.hpp"
|
||||
#include "zigzag01.hpp"
|
||||
#include "zigzag02.hpp"
|
||||
#include "zigzag04.hpp"
|
||||
#include "zigzag08.hpp"
|
||||
#include "zigzag16.hpp"
|
||||
#include "zigzag32.hpp"
|
||||
|
||||
#include "Backend.hpp"
|
||||
#include "ConnectionHistory.hpp"
|
||||
@@ -96,8 +101,8 @@ static uint8_t* iconPx;
|
||||
static int iconX, iconY;
|
||||
static void* iconTex;
|
||||
static int iconTexSz;
|
||||
static uint8_t* zigzagPx;
|
||||
static int zigzagX, zigzagY;
|
||||
static uint8_t* zigzagPx[6];
|
||||
static int zigzagX[6], zigzagY[6];
|
||||
void* zigzagTex;
|
||||
static Backend* bptr;
|
||||
static bool s_customTitle = false;
|
||||
@@ -223,7 +228,12 @@ int main( int argc, char** argv )
|
||||
|
||||
auto iconThread = std::thread( [] {
|
||||
iconPx = stbi_load_from_memory( (const stbi_uc*)Icon_data, Icon_size, &iconX, &iconY, nullptr, 4 );
|
||||
zigzagPx = stbi_load_from_memory( (const stbi_uc*)ZigZag_data, ZigZag_size, &zigzagX, &zigzagY, nullptr, 4 );
|
||||
zigzagPx[0] = stbi_load_from_memory( (const stbi_uc*)ZigZag32_data, ZigZag32_size, &zigzagX[0], &zigzagY[0], nullptr, 4 );
|
||||
zigzagPx[1] = stbi_load_from_memory( (const stbi_uc*)ZigZag16_data, ZigZag16_size, &zigzagX[1], &zigzagY[1], nullptr, 4 );
|
||||
zigzagPx[2] = stbi_load_from_memory( (const stbi_uc*)ZigZag08_data, ZigZag08_size, &zigzagX[2], &zigzagY[2], nullptr, 4 );
|
||||
zigzagPx[3] = stbi_load_from_memory( (const stbi_uc*)ZigZag04_data, ZigZag04_size, &zigzagX[3], &zigzagY[3], nullptr, 4 );
|
||||
zigzagPx[4] = stbi_load_from_memory( (const stbi_uc*)ZigZag02_data, ZigZag02_size, &zigzagX[4], &zigzagY[4], nullptr, 4 );
|
||||
zigzagPx[5] = stbi_load_from_memory( (const stbi_uc*)ZigZag01_data, ZigZag01_size, &zigzagX[5], &zigzagY[5], nullptr, 4 );
|
||||
} );
|
||||
|
||||
ImGuiTracyContext imguiContext;
|
||||
@@ -245,9 +255,8 @@ int main( int argc, char** argv )
|
||||
|
||||
SetupDPIScale( dpiScale, s_fixedWidth, s_bigFont, s_smallFont );
|
||||
|
||||
tracy::UpdateTextureRGBA( zigzagTex, zigzagPx, zigzagX, zigzagY );
|
||||
tracy::MakeMipMaps( zigzagTex );
|
||||
free( zigzagPx );
|
||||
tracy::UpdateTextureRGBAMips( zigzagTex, (void**)zigzagPx, zigzagX, zigzagY, 6 );
|
||||
for( auto& v : zigzagPx ) free( v );
|
||||
|
||||
if( initFileOpen )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user