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