-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 Samples without external dependencies (OSX and Windows) #135
Conversation
Hi @ocornut, I see you've been recently working on removing dependencies from GLEW in the windows samples. Thanks! |
Hello, Glew is now all removed. I replaced it with gl3w.c which is a single prebuild .c file + a header. I haven't tested that on many architectures. Yes I'm interested in your PR, it's just that they are easy to merge: I need to test on Mac and generally decide how we can have more samples while keeping them consistent, synchronized and as simple as possible. Please post the Windows GLFW PR if you have it! Preferably based on last version where I have already removed GLEW. But I may not merge that very fast because it is a bit of an annoying puzzle to work on samples apps. However for reference purpose it's really useful. I think an example with GLFW still makes sense because it is a library that many people use and it's simple, but having to include a precompiled version is quite bad. FYI the only reason I'm doing that is to increase the odds that the demo will build under Windows on the first try, because it's generally a real pain to manage librairies with Visual Studio and people often GIVE UP trying a library because of this type of thing. If we can include an OpenGL example that would compile out of the box without glfw then I suppose we can remove glfw windows binaries. Also - I am considering refactoring the example in a way that there would be separate files e.g. imgui_glfw.c that the user could grab without modification into their application. It would still be "example" code but easy to grab. Thanks again for the PR and sorry for not answering earlier. |
Thanks for the code! |
I have started reorganizing the sample code. there's now opengl_example/ opengl3_example/ The files should be much easier to just copy and paste now. So we can rework the other examples to work in a similar fashion. |
Just a note: the opengl/opengl3 examples compile out-of-the box on osx/linux/windows (without having to install glfw3 manually) with the cmake projects. Well, you do need to install cmake. |
Not sure why you closed this, it still seems to matter to me. |
My git-fu is terrrible, I was trying to rename some branches and I ended up deleting the master ...the commit referencing this PR is now in branch https://github.com/Pagghiu/imgui/tree/pagghiu-standalone-examples. |
Just create a new one and we can link to this people. (The git-fu of most reasonable people is terrible. Git is terrible in that one need to invest so much time into it..) |
This sample compiles on OSX without any dependency.
Just open the Xcode project and hit run.
It can even be compiled on command line, as doesn’t use Interface Builder but straight Cocoa API.
Handles Retina Display resolution.
Tested on XCode 6.1.1 with OSX 10.10