mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Notify profiler about root window size.
This commit is contained in:
parent
9416f5bb49
commit
df7db3bd2b
@ -121,6 +121,9 @@ int main( int argc, char** argv )
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int display_w, display_h;
|
||||||
|
glfwGetFramebufferSize(window, &display_w, &display_h);
|
||||||
|
|
||||||
ImGui_ImplGlfwGL3_NewFrame();
|
ImGui_ImplGlfwGL3_NewFrame();
|
||||||
|
|
||||||
if( !view )
|
if( !view )
|
||||||
@ -191,6 +194,7 @@ int main( int argc, char** argv )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( loadThread.joinable() ) loadThread.join();
|
if( loadThread.joinable() ) loadThread.join();
|
||||||
|
view->NotifyRootWindowSize( display_w, display_h );
|
||||||
if( !view->Draw() )
|
if( !view->Draw() )
|
||||||
{
|
{
|
||||||
view.reset();
|
view.reset();
|
||||||
@ -257,8 +261,6 @@ int main( int argc, char** argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Rendering
|
// Rendering
|
||||||
int display_w, display_h;
|
|
||||||
glfwGetFramebufferSize(window, &display_w, &display_h);
|
|
||||||
glViewport(0, 0, display_w, display_h);
|
glViewport(0, 0, display_w, display_h);
|
||||||
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
|
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
@ -50,6 +50,8 @@ public:
|
|||||||
|
|
||||||
static bool Draw();
|
static bool Draw();
|
||||||
|
|
||||||
|
void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Namespace : uint8_t
|
enum class Namespace : uint8_t
|
||||||
{
|
{
|
||||||
@ -240,6 +242,8 @@ private:
|
|||||||
const char* m_textEditorFile;
|
const char* m_textEditorFile;
|
||||||
ImFont* m_textEditorFont;
|
ImFont* m_textEditorFont;
|
||||||
|
|
||||||
|
float m_rootWidth, m_rootHeight;
|
||||||
|
|
||||||
struct FindZone {
|
struct FindZone {
|
||||||
enum : uint64_t { Unselected = std::numeric_limits<uint64_t>::max() - 1 };
|
enum : uint64_t { Unselected = std::numeric_limits<uint64_t>::max() - 1 };
|
||||||
enum class GroupBy : int { Thread, UserText, Callstack };
|
enum class GroupBy : int { Thread, UserText, Callstack };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user