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

One layer's instance ranges within the flat GPU buffers, normal instances before negatives. More...

#include <frame_packet.h>

Public Member Functions

bool NeedsTempFBO () const
 
bool HasGeometry () const
 

Public Attributes

float depth = 0.0f
 
float alpha = 1.0f
 Compositing alpha.
 
bool hasNegatives = false
 Subtractive instances go through a temp FBO so their erasure stays within the layer.
 
RENDER_TARGET target = TARGET_CACHED
 Picks the static (cached) or dynamic scene pool for this range.
 
RHI_SHAPE_COUNTS start {}
 Each shape's normal elements, then for an instanced shape its negatives.
 
RHI_SHAPE_COUNTS count {}
 
RHI_SHAPE_COUNTS negStart {}
 
RHI_SHAPE_COUNTS negCount {}
 
uint32_t bitmapStart = 0
 
uint32_t bitmapCount = 0
 
std::array< RHI_BufferHandle, RHI_SHAPES > buffer
 Buffers a retained scene layer owns per shape.
 
std::array< RHI_BufferHandle, RHI_SHAPES > negBuffer
 
float depthNear = 0.0f
 Depth slice the range is drawn into.
 
float depthFar = 1.0f
 
bool singleCoverage = false
 Draw straight into the target using the range's own depth slice, either taking each pixel once at translucent alpha or marking knockouts in depth before the rest.
 
bool depthKnockout = false
 
bool overlayAlpha = false
 Elements flagged RHI_INSTANCE_OVERLAY_ALPHA, drawn with RHI_GAL_PIPELINES::GetPremultipliedVariant.
 
bool difference = false
 A diff layer (GAL::StartDiffLayer) that replaces what is under it with the colour difference, as gerbview's XOR mode needs.
 
RHI_LAYER_DIM dim
 
uint32_t runStart = 0
 The range's runs in FRAME_DRAW_DESC::polarityRuns, none when its order does not matter.
 
uint32_t runCount = 0
 
std::shared_ptr< const RHI_RUN_TABLE > cullRuns
 Bounds of the range's buffers so off-screen runs are skipped.
 

Detailed Description

One layer's instance ranges within the flat GPU buffers, normal instances before negatives.

Definition at line 171 of file frame_packet.h.

Member Function Documentation

◆ HasGeometry()

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

Definition at line 248 of file frame_packet.h.

References bitmapCount, count, negCount, and KIGFX::RHI_SHAPES.

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

◆ NeedsTempFBO()

bool KIGFX::LAYER_RANGE::NeedsTempFBO ( ) const
inline

Definition at line 246 of file frame_packet.h.

References alpha, depthKnockout, difference, and hasNegatives.

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

Member Data Documentation

◆ alpha

float KIGFX::LAYER_RANGE::alpha = 1.0f

Compositing alpha.

Below 1 the layer goes through a temp FBO, and a layer of mixed alpha keeps 1 with per-instance alpha.

Definition at line 179 of file frame_packet.h.

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

◆ bitmapCount

uint32_t KIGFX::LAYER_RANGE::bitmapCount = 0

◆ bitmapStart

uint32_t KIGFX::LAYER_RANGE::bitmapStart = 0

◆ buffer

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

Buffers a retained scene layer owns per shape.

A null handle indexes the draw descriptor's buffer.

Definition at line 205 of file frame_packet.h.

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

◆ count

RHI_SHAPE_COUNTS KIGFX::LAYER_RANGE::count {}

Definition at line 195 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush(), HasGeometry(), and KIGFX::RhiRangeReaches().

◆ cullRuns

std::shared_ptr<const RHI_RUN_TABLE> KIGFX::LAYER_RANGE::cullRuns

Bounds of the range's buffers so off-screen runs are skipped.

Null draws everything.

Definition at line 244 of file frame_packet.h.

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

◆ depth

float KIGFX::LAYER_RANGE::depth = 0.0f

◆ depthFar

float KIGFX::LAYER_RANGE::depthFar = 1.0f

Definition at line 213 of file frame_packet.h.

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

◆ depthKnockout

bool KIGFX::LAYER_RANGE::depthKnockout = false

◆ depthNear

float KIGFX::LAYER_RANGE::depthNear = 0.0f

Depth slice the range is drawn into.

Retained layers store relative depth so reordering layers rewrites no geometry, and the default keeps the elements' own depth.

Definition at line 212 of file frame_packet.h.

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

◆ difference

bool KIGFX::LAYER_RANGE::difference = false

A diff layer (GAL::StartDiffLayer) that replaces what is under it with the colour difference, as gerbview's XOR mode needs.

Definition at line 231 of file frame_packet.h.

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

◆ dim

RHI_LAYER_DIM KIGFX::LAYER_RANGE::dim

Definition at line 233 of file frame_packet.h.

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

◆ hasNegatives

bool KIGFX::LAYER_RANGE::hasNegatives = false

Subtractive instances go through a temp FBO so their erasure stays within the layer.

Definition at line 184 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush(), and NeedsTempFBO().

◆ negBuffer

std::array<RHI_BufferHandle, RHI_SHAPES> KIGFX::LAYER_RANGE::negBuffer

Definition at line 206 of file frame_packet.h.

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

◆ negCount

RHI_SHAPE_COUNTS KIGFX::LAYER_RANGE::negCount {}

Definition at line 197 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush(), HasGeometry(), and KIGFX::RhiRangeReaches().

◆ negStart

RHI_SHAPE_COUNTS KIGFX::LAYER_RANGE::negStart {}

Definition at line 196 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush(), and KIGFX::RhiRangeReaches().

◆ overlayAlpha

bool KIGFX::LAYER_RANGE::overlayAlpha = false

Elements flagged RHI_INSTANCE_OVERLAY_ALPHA, drawn with RHI_GAL_PIPELINES::GetPremultipliedVariant.

Definition at line 225 of file frame_packet.h.

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

◆ runCount

uint32_t KIGFX::LAYER_RANGE::runCount = 0

Definition at line 239 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush().

◆ runStart

uint32_t KIGFX::LAYER_RANGE::runStart = 0

The range's runs in FRAME_DRAW_DESC::polarityRuns, none when its order does not matter.

Definition at line 238 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush().

◆ singleCoverage

bool KIGFX::LAYER_RANGE::singleCoverage = false

Draw straight into the target using the range's own depth slice, either taking each pixel once at translucent alpha or marking knockouts in depth before the rest.

Definition at line 219 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush().

◆ start

RHI_SHAPE_COUNTS KIGFX::LAYER_RANGE::start {}

Each shape's normal elements, then for an instanced shape its negatives.

Definition at line 194 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush(), and KIGFX::RhiRangeReaches().

◆ target

RENDER_TARGET KIGFX::LAYER_RANGE::target = TARGET_CACHED

Picks the static (cached) or dynamic scene pool for this range.

Definition at line 189 of file frame_packet.h.

Referenced by KIGFX::GAL_MODERN::Flush().


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