Skip to content

2020wmarvil/CrossPlatformGUI_Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrossPlatformGUI_Template

This is a convenient template for quickly getting a cross-platform GUI project up and running in C++ with GLFW, OpenGL, and DearImGUI.

Setup

Create a build directory

mkdir build && cd build

Run CMake from the build directory

cmake ..

To build and execute the project, use the generated makefile (Unix default) or MSBuild solution (Windows default).

Modifying the project

To add header and source files, append the filepaths to add_executable(${PROJECT_NAME} main.cpp <your_files_here>)

To modify the user interface, see the ImGUI GLFW/OpenGL example, or uncomment the ImGui::ShowDemoWindow() function in main.cpp.

For convenience, ImPlot, ImSpinner, and LegitProfiler are also included in the ImGui source files.

Usage

If your application does not require rendering outside of the UI itself, you can set bUIShouldFillWindow = true to in main.cpp. This will force the ImGUI context to fill the GLFW window.

Otherwise, you can use the GLFW window to render arbitrary geometry, with floating ImGUI windows that can be dragged or docked for convenience. ImGUI will generate an imgui.ini file in the build directory, which stores layout preferences, and automatically sets ImGUI window positions and sizes on startup. Delete this file to reset preferences to default.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published