wow2006 / RCCpp-DearImGui-GLFW-example

Add Runtime Compiled C++ to the Dear ImGui example using the GLFW and OpenGL backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support our work through GitHub Sponsors or Patreon

Become a Patron

RCC++ Dear ImGui GLFW example

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.

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.

About

Add Runtime Compiled C++ to the Dear ImGui example using the GLFW and OpenGL backend


Languages

Language:C++ 82.6%Language:CMake 14.8%Language:C 2.6%