Giter Site home page Giter Site logo

glframework's Introduction

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)

glframework's People

Contributors

lrlvec avatar

Stargazers

Lei Wang avatar Tianyu Wu avatar  avatar HamiltonHuaji avatar Yerba avatar REN HAOFAN avatar  avatar  avatar

Watchers

GP Wang avatar  avatar

Forkers

mfkiwl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.