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

OpenGL/DirectX setup #8

Closed
dkrikun opened this issue Aug 11, 2014 · 4 comments
Closed

OpenGL/DirectX setup #8

dkrikun opened this issue Aug 11, 2014 · 4 comments

Comments

@dkrikun
Copy link

dkrikun commented Aug 11, 2014

Hello!

ImGui looks very cool to me. A question though: in the README.md there are about ~5-7 lines of code to create the UI shown, but the examples include a rather long OpenGL/DirectX setup.
I understand the setup is required, because the library itself is agnostic of it.

Could you please write about how-to best setup OpenGL for the use with the library? Is it possible that at some moment the setup code would be included as a part of the library facilities?

Thanks 👍

@ocornut
Copy link
Owner

ocornut commented Aug 11, 2014

The examples are standalone applications requiring a minimum amount of setup (creating windows, initializing graphics, function to load shaders) which may be not needed in your own engine.

For now I suggest following the OpenGL example to understand how ImGui is setup, it should be fairly straightforward. Note that I simplified them already in the master branch compared to the initial release. I'd like to further simplify and clarify the setup so feel free to ask specific question about what is confusing or in case you are stuck (hopefully it'll help improve the setup experience for everyone).

The example may become some sort of platform-specific helper to ease integration, but in my experience people uses different engines and it is best leaving raw examples that people can understand and adapt rather than trying to fit to all.
Thanks!

@dkrikun
Copy link
Author

dkrikun commented Aug 12, 2014

Thanks for the answer. Another question: is it possible/how it could be made possible to display imgui windows as first-class operating system. What I mean is that when I run one of the examples, I see a single Windows OS window with a few neat imgui windows inside. I would like for those imgui windows to be standalone. 😄

@ocornut
Copy link
Owner

ocornut commented Aug 12, 2014

Unfortunately that's not the scope or purpose of this library. You could possibly re-adapt the library for that purpose but it may be simpler to rewrite one.

This QT-based library appears to be closer to what you want:
https://code.google.com/p/imgui/

@ocornut
Copy link
Owner

ocornut commented Aug 13, 2014

I have rewritten the OpenGL sample to use the old fixed function pipeline, it is now much simplier and straightforward.

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

No branches or pull requests

2 participants