This is a demo project for ImGui with opegl, glfw3, glew and CMake.
This project generates a stand alone demo app. Currently it has been built only on Apple and Windows environments, and, due to the structure of the project, linux builds should theoretically take minimal effort.
It's easy to use simple GUI library for C++. It suits for 3D pipeline enabled application. The easiest way is just copy and add libraries in your project. That's all.
The next citations are from it's README.
dear imgui (AKA ImGui), is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application. It is fast, portable, renderer agnostic and self-contained (no external dependencies).
ImGui is designed to enable fast iteration and empower programmers to create content creation tools and visualization/ debug tools (as opposed to UI for the average end-user). It favors simplicity and productivity toward this goal, and thus lacks certain features normally found in more high-level libraries.
Install libraries:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Install homebrew
$ brew update
$ brew install cmake # Install CMake
$ brew install glfw # Install glfw3
$ brew install glew # Install glew
Build and generate a stand alone app:
$ cd /to/project/root/
$ mkdir build && cd build
$ cmake ..
$ make
Or you can build and run with CLion.
You'll find the app in the build directry.
1. Install Packages with vcpkg
With command prompt or powershell, navigate to the folder where vcpkg is installed and execute the following commands to download the 64-bit and 32-bit versions of GLFW, respectively.
vcpkg install glfw3:x64-windows
vcpkg install glfw3:x86-windows
Vcpkg can also install GLEW with the following commands
vcpkg install glew:x64-windows
vcpkg install glew:x86-windows
Check that the packages were installed with the command vcpkg list
At this point, running CMake on the root directory of this project should finish without errors.
Select imgui-demo.app.exe
from the dropdown menu of startup items and press the big play button. A window should appear with fun knobby controls.
Currently no instructions - Your contribution is welcomed.
- ocornut/imgui: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies
- OpenGL - The Industry Standard for High Performance Graphics
- GLFW - An OpenGL library
- GLEW: The OpenGL Extension Wrangler Library
- CMake
- Homebrew — The missing package manager for macOS
- m516: Windows support and documentation
This project was originally a by-product of my learning of CMake and ImGui. Your comments and pull request are always welcomed.