mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add frame images to test application.
This commit is contained in:
parent
2eb67b4684
commit
5c1bae812a
7547
test/stb_image.h
Normal file
7547
test/stb_image.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,10 @@
|
|||||||
#include "../Tracy.hpp"
|
#include "../Tracy.hpp"
|
||||||
#include "../common/TracySystem.hpp"
|
#include "../common/TracySystem.hpp"
|
||||||
|
|
||||||
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
|
#define STBI_ONLY_JPEG
|
||||||
|
#include "stb_image.h"
|
||||||
|
|
||||||
struct static_init_test_t
|
struct static_init_test_t
|
||||||
{
|
{
|
||||||
static_init_test_t()
|
static_init_test_t()
|
||||||
@ -297,6 +301,9 @@ int main()
|
|||||||
tracy::SetThreadName( t21, "Deadlock test 1" );
|
tracy::SetThreadName( t21, "Deadlock test 1" );
|
||||||
tracy::SetThreadName( t22, "Deadlock test 2" );
|
tracy::SetThreadName( t22, "Deadlock test 2" );
|
||||||
|
|
||||||
|
int x, y;
|
||||||
|
auto image = stbi_load( "image.jpg", &x, &y, nullptr, 4 );
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
TracyMessageL( "Tick" );
|
TracyMessageL( "Tick" );
|
||||||
@ -305,6 +312,7 @@ int main()
|
|||||||
ZoneScoped;
|
ZoneScoped;
|
||||||
std::this_thread::sleep_for( std::chrono::milliseconds( 2 ) );
|
std::this_thread::sleep_for( std::chrono::milliseconds( 2 ) );
|
||||||
}
|
}
|
||||||
|
FrameImage( image, x, y, 0, false );
|
||||||
FrameMark;
|
FrameMark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user