CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Introduction to custom renderers
The framework includes an OpenGL, Vulkan and WebGPU renderers. Though these renderers are fine for most applications, usages that require more advanced rendering, including basic features such as having multiple pipelines, are impossible to achieve with the built-in renderers.
This is why with release 1.3 of the framework, the entire renderer abstraction was reworked to allow projects to plug in their own custom rendering solutions.
With the current arrangement, developers are only limited to OpenGL, Vulkan and WebGPU, even for their custom renderers. To allow for a wider selection of rendering backends, we also decided to include the following build options that automatically compile and link to the corresponding imgui backends and APIs:
-
IMGUI_BUILD_WITH_METAL
- macOS-only. Builds with the Metal API -
IMGUI_BUILD_WITH_DX11
- Windows-only. Builds with DirectX 11 -
IMGUI_BUILD_WITH_DX11
- Windows-only. Builds with DirectX 12
In order to start using a custom renderer, you need to configure your Config/Core/Renderer.yaml
file so that the renderer
field is set to custom
. More information can be found here.
In code, renderer backends are represented using the RendererType
enum, which looks like this:
enum UImGui_RendererType
{
UIMGUI_RENDERER_TYPE_OPENGL,
UIMGUI_RENDERER_TYPE_VULKAN_WEBGPU,
UIMGUI_RENDERER_TYPE_CUSTOM,
UIMGUI_RENDERER_TYPE_COUNT,
UIMGUI_RENDERER_TYPE_ALT_NAMES_COUNT
};
So setting the renderer type to custom
automatically switches this variable to UIMGUI_RENDERER_TYPE_CUSTOM
.
A custom renderer also has access to the custom-renderer
field which can be parsed using a callback that will be introduced in the following page.
This project is supported by all the people who joined our discord server and became beta testers. If you want to join the discord you can click here.
- Home
- Beginner content
- Install guide
- Creating and using the UI components
- The Instance
- The Init Info struct
- Building better titlebar menus
- Textures
- Logging
- Unicode support
- Additional features
- Client-side bar
- Custom type definitions
- Memory management
- C API development
- Config files and Folders
- Interfaces
- Internal Event safety
- Customising the build system
- Modules system
- Collaborating with others
- Advanced content
- Developer and contributor resources
- Misc