opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Public Attributes | Friends | List of all members
osc::RenderPassConfig Struct Referencefinal

Represents the top-level configuration options for a single render pass. More...

#include <render_pass_config.h>

Collaboration diagram for osc::RenderPassConfig:
[legend]

Public Attributes

std::optional< Rect > viewport_rect {}
 
std::optional< Rect > scissor_rect {}
 
Color clear_color = Color::clear()
 
ClearFlags clear_flags = ClearFlag::Default
 

Friends

bool operator== (const RenderPassConfig &, const RenderPassConfig &)=default
 

Detailed Description

Represents the top-level configuration options for a single render pass.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const RenderPassConfig &  ,
const RenderPassConfig &   
)
friend

Member Data Documentation

◆ clear_color

Color osc::RenderPassConfig::clear_color = Color::clear()

The color that the render target's color attachments should be cleared with - if clear_flags indicates the attachments should be cleared.

◆ clear_flags

ClearFlags osc::RenderPassConfig::clear_flags = ClearFlag::Default

Flags that tell the renderer if (and what) it should clear before rendering.

◆ scissor_rect

std::optional<Rect> osc::RenderPassConfig::scissor_rect {}

The scissor rectangle, which tells the renderer to only clear and/or render fragments (pixels) that occur within the given sub-rectangle in the render target. The rectangle is defined in screen space, which:

  • Is measured in device-independent pixels
  • Starts in the bottom-left corner
  • Ends in the top-right corner

std::nullopt implies that the camera should clear (if applicable) the entire output, followed by writing output fragments to the full extents of pixel_rect with no scissoring.

◆ viewport_rect

std::optional<Rect> osc::RenderPassConfig::viewport_rect {}

Where the renderer should rasterize its pixels in the render target. The rectangle is defined in screen space, which:

  • Is measured in device-independent pixels
  • Starts in the bottom-left corner
  • Ends in the top-right corner

std::nullopt makes the renderer use the full extents of the render target.


The documentation for this struct was generated from the following file: