Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

morizotter/imgui-opengl-glfw-glew-cmake-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imgui-opengl-glfw-cmake-demo

This is a demo project for ImGui with opegl, glfw3, glew and CMake.

The purpose of this project is to combine ImGui with glew and CMake. The original example is written with gl3w instead of glew. I personally preffers glew. As for CMake, I want to get used to it to build.

This project generates a stand alone demo app. Currently it is build only on Apple environment (only on Macs) but the build system and libraries are all crass-platform so it is possible to expand for build in Windows and Linux environment.

mac-app.gif

A breaf explanation of ImGui

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.

How to build this project

It is really easy to use ImGui. The easiest way is for adding its sources to your project. in this demo, I aimed to use CMake as a build tool in a case cooperating with other sources.

This project uses several libraries so you have to prepare these. If you've alreadly had them you can skip this instructions

Mac

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.

Windows

Currently no instructions - Your contribution are welcomed.

Linux

Currently no instructions - Your contribution are welcomed.

References

Contributions

This project was originally a by-product of my learning of CMake and ImGui. Your comments and pull request are always welcomed.

About

Imgui w/ glfw + glew + cmake

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published