package core:engine/shape

⌘K
Ctrl+K
or
/

    Index

    Types (2)
    Constants (0)

    This section is empty.

    Variables (0)

    This section is empty.

    Procedure Groups (0)

    This section is empty.

    Types

    shape ¶

    shape :: struct {
    	using _: engine.itransform_object,
    	src: ^shape_src,
    }
     

    Shape object structure for rendering geometric shapes

    Extends iobject with shape source data

    Related Procedures With Parameters
    Procedures Through `using` From iobject

    shape_src ¶

    shape_src :: struct {
    	vertexBuf: engine.__vertex_buf($NodeType=shape_vertex2d),
    	indexBuf:  engine.__index_buf,
    	rect:      linalg.Rect_($T=f32),
    }
     

    Shape source structure containing vertex and index buffers

    Related Procedures With Parameters

    Constants

    This section is empty.

    Variables

    This section is empty.

    Procedures

    shape_change_color_transform ¶

    shape_change_color_transform :: proc(self: ^shape, colorTransform: ^engine.color_transform) {…}

    shape_init ¶

    shape_init :: proc(self: ^shape, src: ^shape_src, colorTransform: ^engine.color_transform = nil, vtable: ^engine.iobject_vtable = nil) {…}

    shape_src_bind_and_draw ¶

    shape_src_bind_and_draw :: proc(self: ^shape_src, set: ^engine.i_descriptor_set, cmd: engine.command_buffer, viewport: ^engine.viewport) {…}

    shape_src_deinit ¶

    shape_src_deinit :: proc(self: ^shape_src) {…}
     

    Deinitializes and cleans up shape source resources

    Inputs:
    self: Pointer to the shape source to deinitialize

    shape_src_init ¶

    shape_src_init :: proc(self: ^shape_src, shapes: ^geometry.shapes, flag: engine.resource_usage = .GPU, allocator := context.allocator) -> (err: geometry.shape_error = nil) {…}
     

    Initializes shape source from geometry shapes

    Note: allocator is used to allocate the raw shape and delete this when shape_src init is done. (async)

    Inputs:
    self: Pointer to the shape source to initialize shapes: Pointer to the geometry shapes flag: Resource usage flag for buffers (default: .GPU)

    Returns:
    An error if initialization failed

    shape_src_init_raw ¶

    shape_src_init_raw :: proc(self: ^shape_src, raw: ^geometry.raw_shape, flag: engine.resource_usage = .GPU, allocator: runtime.Maybe($T=Allocator) = nil) {…}

    shape_src_is_inited ¶

    shape_src_is_inited :: proc "contextless" (self: ^shape_src) -> bool {…}

    shape_src_update ¶

    shape_src_update :: proc(self: ^shape_src, shapes: ^geometry.shapes, allocator := context.allocator) -> (err: geometry.shape_error = nil) {…}

    shape_src_update_raw ¶

    shape_src_update_raw :: proc(self: ^shape_src, raw: ^geometry.raw_shape, allocator: runtime.Maybe($T=Allocator) = nil) {…}
     

    Updates the shape source with a new raw shape

    Note: allocator is used to delete raw when shape_src update is done. (async) If allocator is nil, not delete raw.

    Inputs:
    self: Pointer to the shape source to update raw: Pointer to the new raw shape allocator: The allocator to use for the raw shape

    shape_update_transform ¶

    shape_update_transform :: proc(self: ^shape, pos: [3]f32, rotation: f32, scale: [2]f32 = {1, 1}, pivot: [2]f32 = {0.0, 0.0}) {…}

    shape_update_transform_matrix_raw ¶

    shape_update_transform_matrix_raw :: proc(self: ^shape, _mat: matrix[4, 4]f32) {…}

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-v0.0.1 (vendor "odin") Linux_amd64 @ 2026-01-30 10:23:15.884604782 +0000 UTC