-
-
Notifications
You must be signed in to change notification settings - Fork 4
Renderer
The Renderer
interface looks like this:
class Renderer
{
static RendererData& data() noexcept;
static void saveSettings() noexcept;
static const FString& getVendorString() noexcept;
static const FString& getAPIVersion() noexcept;
static const FString& getGPUName() noexcept;
static const FString& getDriverVersion() noexcept;
};
The first function returns a reference to the RendererData
struct that looks like this:
struct RendererData
{
bool bVulkan = false; // Enables the vulkan submodule
bool bUsingVSync = true; // Enables V-Sync, defaults to true
uint32_t msaaSamples = 8; // The number of samples for MSAA, supersampling
bool bSampleRateShading = false; // A boolean that if set to true enables sample rate shading, simply MSAA on shaders
float sampleRateShadingMult = 0.0f; // Multiplier for sample rate shading, the higher = less performance but more quality
};
You can see descriptions in the code comments above. It is defined as part of the C API under C/Internal/RendererData.h
.
The saveSettings
function saves the settings in this struct to the Renderer config file under Config/Core/Renderer.yaml
.
All functions after that, return information fetched from the Graphics API about your GPU, like the driver version or API version.
Note
bVulkan
is also set to true
when using the WebGPU renderer when targeting WASM
The settings for the renderer are stored at Config/Core/Renderer.yaml
, which looks like this:
vulkan: false
v-sync: false
msaa-samples: 8
sample-rate-shading: false
sample-rate-shading-mult: 0.1
And corresponds directly to the RendererData
struct documented above.
The following members of the Renderer
interface are marked as Any time
:
data()
saveSettings()
The rest are marked as Begin
.
The C API is the same as the C++ one, but using standard C API semantics such as prefixing each function with
UImGui_Renderer_
, as defined here.
The API looks like this:
// Event Safety - Any time
UImGui_RendererData* UImGui_Renderer_data();
// Event Safety - Any time
void UImGui_Renderer_saveSettings();
// Event Safety - begin, post-begin
UImGui_String UImGui_Renderer_getVendorString();
// Event Safety - begin, post-begin
UImGui_String UImGui_Renderer_getAPIVersion();
// Event Safety - begin, post-begin
UImGui_String UImGui_Renderer_getGPUName();
// Event Safety - begin, post-begin
UImGui_String UImGui_Renderer_getDriverVersion();
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
- Advanced content
- Loading dynamic libraries at runtime
- Understanding the library layout
- Compilation mode modifiers
- Adding plugin support to your application
- Production export and deployment
- Targeting WASM
- Developer and contributor resources
- Misc