ImGui::Text("Application average %.3f ms/frame (%.1f FPS)",ms_per_frame_avg,1000.0f/ms_per_frame_avg);
// Show the ImGui test window
// Most of user example code is in ImGui::ShowTestWindow()
if(show_test_window)
// 1. Show a simple window
// Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets appears in a window automatically called "Debug"
{
ImGui::SetNewWindowDefaultPos(ImVec2(650,20));// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
if(show_test_window)
{
ImGui::SetNewWindowDefaultPos(ImVec2(650,20));// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
io.MousePos=ImVec2((float)mouse_x*mousePosScale.x,(float)mouse_y*mousePosScale.y);// Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.)
io.MouseDown[0]=mousePressed[0]||glfwGetMouseButton(window,GLFW_MOUSE_BUTTON_LEFT)!=0;// If a mouse press event came, always pass it, so we don't miss click-release events that are shorted than our frame.
io.MouseDown[0]=mousePressed[0]||glfwGetMouseButton(window,GLFW_MOUSE_BUTTON_LEFT)!=0;// If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)",ms_per_frame_avg,1000.0f/ms_per_frame_avg);
// Show the ImGui test window
// Most of user example code is in ImGui::ShowTestWindow()
if(show_test_window)
// 1. Show a simple window
// Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets appears in a window automatically called "Debug"
{
ImGui::SetNewWindowDefaultPos(ImVec2(650,20));// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
@ -310,6 +305,13 @@ int main(int argc, char** argv)
ImGui::End();
}
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
if(show_test_window)
{
ImGui::SetNewWindowDefaultPos(ImVec2(650,20));// Normally user code doesn't need/want to call this, because positions are saved in .ini file. Here we just want to make the demo initial state a bit more friendly!