struct Diorite::FrameDrawBuffers

Overview

Complete suite of per-frame 3D (on-top + depth-tested) and 2D immediate-mode debug vertex/color batches allocated from Lapis::Core::FrameArena.

Defined in:

diorite/core/frame_arena_batch.cr

Constant Summary

DEFAULT_2D_CAPACITY = 4096
DEFAULT_DEPTH_3D_CAPACITY = 4096
DEFAULT_ON_TOP_3D_CAPACITY = 8192

Constructors

Instance Method Summary

Constructor Detail

def self.from_arena(arena : Lapis::Core::FrameArena = Lapis::Core::FrameArena.current, cap_3d_on_top : Int32 = DEFAULT_ON_TOP_3D_CAPACITY, cap_3d_depth : Int32 = DEFAULT_DEPTH_3D_CAPACITY, cap_2d : Int32 = DEFAULT_2D_CAPACITY) : FrameDrawBuffers #

Carves a complete per-frame buffer set from arena.


def self.new(batch_3d_on_top : FrameLineBatch3D, batch_3d_depth : FrameLineBatch3D, batch_2d : FrameLineBatch2D) #

Instance Method Detail

def batch_2d : FrameLineBatch2D #

def batch_3d_depth : FrameLineBatch3D #

def batch_3d_on_top : FrameLineBatch3D #

def clear : self #

def cols_2d : ArenaVertexBuffer(Godot::Color) #

def cols_depth : ArenaVertexBuffer(Godot::Color) #

def cols_top : ArenaVertexBuffer(Godot::Color) #

def compile_2d(queue : DebugCommandQueue) : self #

Compiles all enabled 2D commands and telemetry graphs from queue into @batch_2d.


def compile_3d(queue : DebugCommandQueue) : self #

Compiles all enabled 3D commands from queue into @batch_3d_on_top and @batch_3d_depth.


def compile_command_2d(cmd : Command2D) : Void #

Compiles a single Command2D into the 2D arena batch.


def compile_command_3d(cmd : Command3D) : Void #

Compiles a single Command3D into its target 3D arena batch.


def compile_queue(queue : DebugCommandQueue) : self #

Compiles all enabled 3D commands, 2D commands, and telemetry graphs from queue into these arena-backed buffers and updates the queue's vertex counters.


def total_lines_2d : Int32 #

def total_lines_3d : Int32 #

def total_vertex_count : Int32 #

def total_vertices_2d : Int32 #

def total_vertices_3d : Int32 #

def verts_2d : ArenaVertexBuffer(Godot::Vector2) #

def verts_depth : ArenaVertexBuffer(Godot::Vector3) #

def verts_top : ArenaVertexBuffer(Godot::Vector3) #