KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::FRAME_DRAW_DESC Struct Reference

GPU geometry of one frame, built by GAL_MODERN after EndDrawing() and passed through the FRAME_MAILBOX. More...

#include <frame_packet.h>

Public Member Functions

bool HasGeometry () const
 

Public Attributes

RHI_LINE_PIPELINE_KIND linePipelineKind = RHI_LINE_PIPELINE_KIND::PCB_TRACKS
 
std::array< RHI_BufferHandle, RHI_SHAPES > buffer
 Each shape's buffer, normal elements before negatives.
 
RHI_SHAPE_COUNTS count {}
 
RHI_SHAPE_COUNTS negCount {}
 
std::vector< BITMAP_DRAW_DESC > bitmapDraws
 
std::vector< LAYER_RANGE > layerRanges
 
std::vector< POLARITY_RUN > polarityRuns
 
bool drawGrid = false
 
bool drawCursor = false
 
bool reuseStaticFBO = false
 
bool reuseDynamicFBO = false
 
bool gridFirst = false
 Draw the grid before the layers instead of over them.
 
bool relativeDepth = false
 Element depth is relative to its layer's slice in LAYER_RANGE::depthNear, and the projection scales depth to RELATIVE_DEPTH_RANGE.
 
bool testAgainstStatic = false
 Slices share the static target's layer order mapping, so this target can be depth tested against a copy of the static depth.
 
uint32_t supersampleFactor = 1
 Layer FBO scale that the present blit downsamples.
 
uint64_t bufferGeneration = 0
 Generation of the producer's buffers this descriptor was built from.
 
float backgroundColor [4] = { 1.0f, 1.0f, 1.0f, 1.0f }
 
FRAME_UBO_DATA frameUBO
 
GRID_UBO_DATA gridUBO
 
CURSOR_UBO_DATA cursorUBO
 

Static Public Attributes

static constexpr float RELATIVE_DEPTH_RANGE = 16.0f
 Largest depth offset an element can have from its layer when relativeDepth is set.
 

Detailed Description

GPU geometry of one frame, built by GAL_MODERN after EndDrawing() and passed through the FRAME_MAILBOX.

Its buffers are already uploaded.

Definition at line 265 of file frame_packet.h.

Member Function Documentation

◆ HasGeometry()

bool KIGFX::FRAME_DRAW_DESC::HasGeometry ( ) const
inline

Definition at line 324 of file frame_packet.h.

References bitmapDraws, and count.

Referenced by KIGFX::RENDER_THREAD::RenderWindow().

Member Data Documentation

◆ backgroundColor

float KIGFX::FRAME_DRAW_DESC::backgroundColor[4] = { 1.0f, 1.0f, 1.0f, 1.0f }

◆ bitmapDraws

◆ buffer

std::array<RHI_BufferHandle, RHI_SHAPES> KIGFX::FRAME_DRAW_DESC::buffer

Each shape's buffer, normal elements before negatives.

Definition at line 272 of file frame_packet.h.

Referenced by buildDescForPool(), and KIGFX::RENDER_THREAD::RenderGeometryInto().

◆ bufferGeneration

uint64_t KIGFX::FRAME_DRAW_DESC::bufferGeneration = 0

Generation of the producer's buffers this descriptor was built from.

Definition at line 316 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::GetDynamicDrawDesc(), and KIGFX::GAL_MODERN::GetStaticDrawDesc().

◆ count

◆ cursorUBO

CURSOR_UBO_DATA KIGFX::FRAME_DRAW_DESC::cursorUBO

◆ drawCursor

◆ drawGrid

◆ frameUBO

◆ gridFirst

bool KIGFX::FRAME_DRAW_DESC::gridFirst = false

Draw the grid before the layers instead of over them.

Definition at line 288 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::GetStaticDrawDesc(), and KIGFX::RENDER_THREAD::RenderGeometryInto().

◆ gridUBO

GRID_UBO_DATA KIGFX::FRAME_DRAW_DESC::gridUBO

◆ layerRanges

◆ linePipelineKind

RHI_LINE_PIPELINE_KIND KIGFX::FRAME_DRAW_DESC::linePipelineKind = RHI_LINE_PIPELINE_KIND::PCB_TRACKS

◆ negCount

◆ polarityRuns

std::vector<POLARITY_RUN> KIGFX::FRAME_DRAW_DESC::polarityRuns

◆ RELATIVE_DEPTH_RANGE

float KIGFX::FRAME_DRAW_DESC::RELATIVE_DEPTH_RANGE = 16.0f
staticconstexpr

Largest depth offset an element can have from its layer when relativeDepth is set.

Definition at line 305 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::PopulateCameraUBOs(), and relativeDepth().

◆ relativeDepth

bool KIGFX::FRAME_DRAW_DESC::relativeDepth = false

Element depth is relative to its layer's slice in LAYER_RANGE::depthNear, and the projection scales depth to RELATIVE_DEPTH_RANGE.

Definition at line 294 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::appendSceneRanges(), KIGFX::GAL_MODERN::GetDynamicDrawDesc(), and KIGFX::GAL_MODERN::PopulateCameraUBOs().

◆ reuseDynamicFBO

bool KIGFX::FRAME_DRAW_DESC::reuseDynamicFBO = false

Definition at line 283 of file frame_packet.h.

Referenced by KIGFX::RENDER_THREAD::RenderWindow().

◆ reuseStaticFBO

bool KIGFX::FRAME_DRAW_DESC::reuseStaticFBO = false

Definition at line 282 of file frame_packet.h.

Referenced by KIGFX::RENDER_THREAD::RenderWindow().

◆ supersampleFactor

uint32_t KIGFX::FRAME_DRAW_DESC::supersampleFactor = 1

Layer FBO scale that the present blit downsamples.

Values other than 1 are ignored unless the window's FBOs are sized to match.

Definition at line 311 of file frame_packet.h.

Referenced by ApplyAntialiasingMode(), and EDA_DRAW_PANEL_GAL::DoRePaint().

◆ testAgainstStatic

bool KIGFX::FRAME_DRAW_DESC::testAgainstStatic = false

Slices share the static target's layer order mapping, so this target can be depth tested against a copy of the static depth.

Definition at line 300 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::GetDynamicDrawDesc(), and KIGFX::RENDER_THREAD::RenderGeometryInto().


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