Skip to content

GraphFistaha/RHI

Repository files navigation

RHI - Render Hardware Interface

The goal of this project - simple graphic interface that keeps all modern features as multithreading, ray-tracing, compute shaders and so on. Under the hood it can use different API's like vulkan or directX12, but you shouldn't think about it.

How to integrate and build

This project uses CMake as build system, so you can just download this project into some directory and include it in your CMakeLists via add_subdirectory You can link it to another project via target_link_libraries(${target_name} PRIVATE RHI) Also you can define some options:

  • RHI_VULKAN_BACKEND - RHI will be compiled with Vulkan backend. Keep it ON, because there is no another backend yet
  • RHI_BUILD_SHARED - build RHI a shared library (.dll or .so) Recommended - ON
  • RHI_BUILD_TESTS - include unit-tests in build
  • RHI_BUILD_EXAMPLES - example applications from Example folder will be compiled
  • RHI_USE_LOG_OUTPUT - if it's ON then the library will print some debug info in the output, including debug layers of Graphic API

How to use

There is only one header file you need to include in code for using - RHI.hpp. It contains all interface declaration you can use to write code.

Examples

Each example is a little test application which checks some feature of API like uniforms, rendering geometry, multithreading and so on.
Watch examples in order of this list,

  • HelloWindow - start example which should only open window and clear it with changing color
  • HelloTriangle - basic graphic application - opens the window, clear color and draws a colored triangle
  • Uniforms - you'd learn how to setup uniform variables (except Sampler2D)
  • ParallelPass - very important example because it shows how to build an application to provide multithreaded rendering.
  • Textures - a basic example that shows how to work with Sampler2D uniform
  • DownloadImages - shows how to download image from GPU.
  • TexturesArray - shows how to use arrays of uniforms: f.e uniform sampler2D var[5]. For buffered uniforms is similar.
  • LayeredTexture - shows how to implement texture array properly (like Sampler2DArray). Also shows how to generate mipmaps.
  • MultiWindow - example shows how to render into two windows. It's optional example

Projects that use this library

GameEngine - my game engine I write in free time

About

Powerful as Vulkan and simple as OpenGL crossplatform rendering library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages