Skip to content

A light weight multi-window rendering and user interface framework for OpenGL and OpenXR applications

Notifications You must be signed in to change notification settings

LRLVEC/glframework

Repository files navigation

glframework: A light weight multi-window rendering and user interface framework for OpenGL and OpenXR applications

This is an OpenGL and OpenXR based multi-window rendering and user interface system for Windows and Linux desktop, or virtual/augmented/mixed reality. It contains light weight wrappers of OpenGL and OpenXR apis, a multi-window manager and an interface for user-defined imgui UIs.

Demos

Galaxy in Hand

GalaxyInHand demo shows how to use OpenXR features, combined with OpenGL backend. It can take user input and create a whole OpenXR instance pipeline. Future work will be focused on 3D ui.

Multi-simulation

MultiSim demo can render multiple n-body simulations in different windows, with one global imgui (multi-context imgui is not officially supported yet) interface.

Multi-view

MultiView demo can render multiple views of one n-body simulation.

Multi-thread (To be implemented since imgui multi context is not done yet)

MultiThread demo can render multiple windows with one thread for each window.

Render texture

RenderTexture demo can render a texture to the window. The Mandelbrot fractal is rendered to a texture by cuda. This is useful for a CUDA program or off-screen OpenGL program that writes rendering results to a texture.

Requirements

  • CUDA is not necessary for building this, but if supported, demos will use it to accelerate.
  • A C++17 capable compiler. The following choices are recommended and have been tested:
    • Windows: Visual Studio 2019
    • Linux: GCC/G++ 7.5 or higher
  • Some libraries that Linux requires is listed in dependencies.txt.
  • To use OpenXR on Windows, please install openxr_loader with vcpkg, and remember to add vcpkg path to cmake configure command.

Dependencies

  • glew: OpenGL requirements.
  • glfw: Provide window and context for OpenGL.
  • imgui: User interface.
  • tiny-stl: A tiny stl for c++17.

Compilation

Clone this repository and all its submodules using the following command:

$ git clone --recursive https://github.com/LRLVEC/glframework.git
$ cd glframework

Then, use CMake to build the project: (on Windows, this must be in a developer command prompt). If you want to use cuda, add cmake option -DGLFRAMEWORK_ENABLE_CUDA=ON

glframework$ cmake . -B build -DGLFRAMEWORK_ENABLE_CUDA=OFF
glframework$ cmake --build build --config Release -j

Usage

Add glframework as a dependency of your project:

  1. add these to your CMakeLists.txt:
get_target_property(GLFRAMEWORK_INCLUDE_DIRECTORIES glframework INCLUDE_DIRECTORIES)
target_include_directories(your_target PUBLIC ${GLFRAMEWORK_INCLUDE_DIRECTORIES})
target_link_libraries(your_target PUBLIC ${GLFRAMEWORK_LIBRARIES})
  1. if you don't wish to build demos in your project, add set(GLFRAMEWORK_BUILD_DEMOS OFF CACHE BOOL " " FORCE)

About

A light weight multi-window rendering and user interface framework for OpenGL and OpenXR applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published