xcode samples dont work
Ahbee opened this issue · comments
i ran into these problems when trying to run with xcode
- ui::ShowDemoWindow() does not exist should be ui::ShowTestWindow();
- path to cinder libs is wrong should be "$(CINDER_PATH)/lib/macosx/Debug/libcinder.a" and
"$(CINDER_PATH)/lib/macosx/Release/libcinder.a" - crashes as soon as you start the example in
ImGuiWindow* GetCurrentWindow()
You probably need to update imgui submodule. Imgui::ShowTestWindow()
has been deprecated longtime ago. Try git submodule update
at the root of the repo.
I have mac osx 10.13.3 and xcode 9.2 and cinder from the latest master on github
I'll try to find a mac to test this tomorrow.
ok thanks so much, yeah it crashes every time i try to resize the window
In the meantime, I think a workaround could be to set ui::Options().autoRender
to false
when initializing ImGui and take care of calling ui::NewFrame
/ ui::Render
yourself.
My guess is that when resizing the window you end up having two ui::Render
for one ui::NewFrame
, which ImGui doesn't like.
I'm also having the same issue. Could you provide a code snippet with the fix you suggested in the last message. I'm new to imgui and cinder and glw3. I was able to create a Imgui project with Tinder and add ImGui::initialize to the cinder_imguiApp::setup() and the following to cinder_imguiApp::draw()
bool show_demo_window = true;
gl::clear( Color( 0, 0, 0 ) );
if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
ImGui::ShowDemoWindow(&show_demo_window);
}}
Thanks
Initialize ImGui like this in your setup or App constructor:
void MyApp::setup()
{
ui::initialize( ui::Options().autoRender( false ) );
}
Then manually call ui::NewFrame
and ui::Render
like this:
void MyApp::update()
{
ui::NewFrame();
// keep all your imgui code between those two calls
ui::Render();
}
It fails now at line 3274 of imgui.cpp:
IM_ASSERT((g.FrameCount == 0 || g.FrameCountEnded == g.FrameCount) && "Forgot to call
Render() or EndFrame() at the end of the previous frame?");
Thanks for helping.
revisions before a777589 work fine on macOS