struct
Diorite::FrameLineBatch2D
- Diorite::FrameLineBatch2D
- Struct
- Value
- Object
Overview
Stack-allocated 2D vertex and color batch buffer carved out of Lapis::Core::FrameArena.
Defined in:
diorite/core/frame_arena_batch.crConstant Summary
-
DEFAULT_CAPACITY =
4096
Constructors
-
.from_arena(arena : Lapis::Core::FrameArena = Lapis::Core::FrameArena.current, max_vertices : Int32 = DEFAULT_CAPACITY) : FrameLineBatch2D
Allocates a paired 2D vertex + color batch from
arena. - .new(verts : ArenaVertexBuffer(Godot::Vector2), cols : ArenaVertexBuffer(Godot::Color))
Instance Method Summary
- #capacity : Int32
- #clear : self
- #color_arena_buffer : Lapis::Core::ArenaBuffer(Godot::Color)
-
#colors : Slice(Godot::Color)
Zero-allocation
Slice(Godot::Color)view over all written 2D vertex colors. - #cols : ArenaVertexBuffer(Godot::Color)
- #empty? : Bool
- #full? : Bool
- #line_count : Int32
- #push_line(from : Godot::Vector2, to : Godot::Vector2, from_color : Godot::Color, to_color : Godot::Color) : Bool
- #push_line(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color) : Bool
- #push_vertex(vertex : Godot::Vector2, color : Godot::Color) : Bool
- #remaining : Int32
- #size : Int32
- #vertex_arena_buffer : Lapis::Core::ArenaBuffer(Godot::Vector2)
- #vertex_count : Int32
-
#vertices : Slice(Godot::Vector2)
Zero-allocation
Slice(Godot::Vector2)view over all written 2D vertices. - #verts : ArenaVertexBuffer(Godot::Vector2)
Constructor Detail
def self.from_arena(arena : Lapis::Core::FrameArena = Lapis::Core::FrameArena.current, max_vertices : Int32 = DEFAULT_CAPACITY) : FrameLineBatch2D
#
Allocates a paired 2D vertex + color batch from arena.
Instance Method Detail
def colors : Slice(Godot::Color)
#
Zero-allocation Slice(Godot::Color) view over all written 2D vertex colors.
def push_line(from : Godot::Vector2, to : Godot::Vector2, from_color : Godot::Color, to_color : Godot::Color) : Bool
#
def vertices : Slice(Godot::Vector2)
#
Zero-allocation Slice(Godot::Vector2) view over all written 2D vertices.