Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Error at basic rendering loop #46

Closed
EliasMasche opened this issue Aug 25, 2017 · 4 comments
Closed

Running Error at basic rendering loop #46

EliasMasche opened this issue Aug 25, 2017 · 4 comments

Comments

@EliasMasche
Copy link

EliasMasche commented Aug 25, 2017

When i try to run, i am getting this error, using the basic example of readthedocs

Traceback (most recent call last):
  File "F:/Programming Projects/Python/twilio-app/main.py", line 3, in <module>
    imgui.new_frame()
  File "imgui\core.pyx", line 993, in imgui.core.new_frame
imgui.core.ImGuiError: ImGui assertion error (g.IO.DisplaySize.x >= 0.0f && g.IO.DisplaySize.y >= 0.0f) at imgui-cpp/imgui.cpp:2046
Process finished with exit code 1

Downloaded and installed trough pip install imgui[full].
PyCharm Community edition even trough python cmd i get the same error
Windows 7 SP1 x64
Python 3.6.2 virtualenv

@EliasMasche EliasMasche changed the title Running Error Running Error at basic rendering loop Aug 25, 2017
@swistakm
Copy link
Member

swistakm commented Aug 25, 2017

Hi @EMGPY, could you share a snippet of your code? The issue tittle says it happens at basic rendering loop so I guess it is short and you can paste whole your code.

Have you tried using any any of the built-in integrations from imgui.integrations subpackage? It seems that you don't use any these.

The error information says that internal ImGui state object isn't properly initialized yet. In such case you need to do proper initialization all by yourself. Unfortunately I didn't have enough time to document how to deal with that yet. The integration modules in imgui.integrations and examples under doc/examples may serve as a basis for making your own integrations.

@EliasMasche
Copy link
Author

import imgui

imgui.new_frame()
imgui.begin("Mi primera ventana", True)
imgui.text("Hola Mundo")
imgui.end()
imgui.render()

This is the example code i tried to run.
About imgui.integrations i didn't used any, because don't want to used, just want to use imgui to create some basics gui apps.
Where i can find the doc/examples because in the imgui folder is missing.

@swistakm
Copy link
Member

Oh, I see.

This won't work. imgui package is not able to render anything on it's own. This is why you need to either use built-in integrations or create own rendering code. Everything is explained in the documentation page titled First steps with imgui. Links to the examples can be found on the bottom of that page. They lead directly to doc/examples project source tree on GitHub.

Read it carefully and you should be able to make your own GUI in a few minutes.

I understand that current documentation may not be clear enough on this topic. Of course, any suggestions on improvements in this area would be very welcome.

@EliasMasche
Copy link
Author

Thanks to make it clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants