All Projects → juliettef → RCCpp-DearImGui-GLFW-example

juliettef / RCCpp-DearImGui-GLFW-example

Licence: Zlib license
Add Runtime Compiled C++ to the Dear ImGui example using the GLFW and OpenGL backend - with power saving

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to RCCpp-DearImGui-GLFW-example

RCCpp DX11 Example
Runtime Compiled C++ example based on the Dear ImGui DirectX11 Example
Stars: ✭ 35 (-42.62%)
Mutual labels:  live-coding, compile, dear-imgui, runtimecompiledcplusplus
Runtimecompiledcplusplus
Change C++ code at runtime
Stars: ✭ 1,843 (+2921.31%)
Mutual labels:  live-coding, compile, runtimecompiledcplusplus, rccpp
imgui-java
JNI based binding for Dear ImGui
Stars: ✭ 270 (+342.62%)
Mutual labels:  glfw, imgui, dear-imgui
SdfFontDesigner
Offline font tuning/bitmap generation via shaders
Stars: ✭ 56 (-8.2%)
Mutual labels:  imgui, dear-imgui
bigger
bigg (bgfx + imgui + glfw + glm) + utils
Stars: ✭ 101 (+65.57%)
Mutual labels:  glfw, imgui
awesome-dear-imgui
A collection of awesome dear imgui bindings, extensions and resources
Stars: ✭ 439 (+619.67%)
Mutual labels:  imgui, dear-imgui
Bimpy
imgui for python
Stars: ✭ 144 (+136.07%)
Mutual labels:  glfw, imgui
ruby-imgui
Yet another ImGui wrapper for Ruby
Stars: ✭ 42 (-31.15%)
Mutual labels:  glfw, imgui
Webgui
An example demo of IMGUI (Immediate Mode GUI) on the web. Using only WebGL, GLFW and ImGui. Suitable for being compiled to web assembly (WASM).
Stars: ✭ 180 (+195.08%)
Mutual labels:  glfw, imgui
lldbg
A lightweight native GUI for LLDB.
Stars: ✭ 83 (+36.07%)
Mutual labels:  unix, imgui
Nimgl
NimGL is a Nim library that offers bindings for popular libraries used in computer graphics
Stars: ✭ 218 (+257.38%)
Mutual labels:  glfw, imgui
GLFW-CMake-starter
Use CMake to create a project with GLFW - Multi-platform Windows, Linux and MacOS.
Stars: ✭ 53 (-13.11%)
Mutual labels:  unix, glfw
odin-imgui
Odin binding for Dear ImGui
Stars: ✭ 37 (-39.34%)
Mutual labels:  imgui, dear-imgui
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (+196.72%)
Mutual labels:  glfw, imgui
ImFrame
dear imgui + glfw framework
Stars: ✭ 86 (+40.98%)
Mutual labels:  glfw, dear-imgui
ImStudio
Real-time GUI layout designer for Dear ImGui
Stars: ✭ 285 (+367.21%)
Mutual labels:  imgui, dear-imgui
polybar-bluetooth
A fully functional bluetooth module for polybar
Stars: ✭ 59 (-3.28%)
Mutual labels:  unix
mican
🍊 A simple Unix shell written in Rust
Stars: ✭ 48 (-21.31%)
Mutual labels:  unix
lobase
Port of the OpenBSD userland to Linux.
Stars: ✭ 89 (+45.9%)
Mutual labels:  unix
imgui entt entity editor
A drop-in entity editor for EnTT with Dear ImGui
Stars: ✭ 146 (+139.34%)
Mutual labels:  imgui

Support our work through GitHub Sponsors or Patreon

Become a Patron

RCC++ Dear ImGui GLFW example with Power Saving

This project adds Runtime Compiled C++ to the Dear ImGui example using the GLFW and OpenGL backend. This enables us to edit the code at runtime and see the results live, without recompiling and restarting the project.

This is a cross platform project using CMake.

Runtime-Compiled C++ (RCC++) is a way to reliably make major changes to C++ code at runtime and see the results immediately. It's aimed at games development but could be useful in any industry where turnaround times are a bottleneck.

github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus

RCC++ is primarily designed to shorten iteration times in development - developers can build their project, run it, make changes during runtime and see the results in a few seconds.

Short teaser of Runtime Compiled C++ Dear ImGui example running on Linux

Note - you can also find a similar Windows-only example in the devlog post Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial.

Power Saving

To reduce the energy used by Dear Imgui, the application draws the user interface only when there is user input.

Example power saving code in commit

The implementation consists in switching the event handling from polling to waiting for events. A power save variable counts a predefined number of frames after the last input has been received. When the countdown ends the application waits for further events, therefore saving power. If input is received the countdown is reset. This allows the GUI to display input changes and for immediate mode states to propagate.

Though not shown in the example, any graphical application can also track when updates are in progress and temporarily disable power saving (for example by resetting the power save countdown). The example sets the swap interval to 1; if the application sets the swap interval to 0 (for example for low latency gaming), another power saving feature would be to set this to 1 when the user is interacting with the GUI.

Getting the code

The easiest way to get hold of the starter code is to run the following command using a shell you can run git from:

git clone --recursive https://github.com/juliettef/RCCpp-DearImGui-GLFW-example

If you are on Windows you can download git from git-scm.com/download/win and use the right click menu in Windows File Explorer to "Git Bash here" and then run git commands.

This will create the directory RCCpp-DearImGui-GLFW-example and get the latest source code, using the --recursive option to download the RuntimeCompiledCPlusPlus, Dear ImGui and GLFW code, which have been included in the tutorial repository as submodules. If you want to run further git commands from the command line you'll need to cd into the directory:

cd RCCpp-DearImGui-GLFW-example

Alternatively you can use a git GUI program such as Fork to get the code. Most of these will automatically download the git submodules.

If you download the code from GitHub via the "Download ZIP" approach, you'll also need to download the RuntimeCompiledCPlusPlus, Dear ImGui and GLFW into the RuntimeCompiledCPlusPlus, imgui and glfw directories. The correct version can be found by clicking on the RuntimeCompiledCPlusPlus, imgui and glfw folders you see on the front page of the RCCpp-DearImGui-GLFW-example GitHub repository.

Using CMake to create the project

From a command prompt in the RCCpp-DearImGui-GLFW-example directory:

  1. mkdir build
  2. cd build
  3. cmake ..
  4. Either run make all or for Visual Studio open RCCpp-DearImGui-GLFW-example.sln

The RCCpp-DearImGui-GLFW-example Window should open.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].