Renderer
A window with an attached graphics library is required for this to function.
renderer.write_to_buffer
renderer.write_to_buffer(primitive_topology: integer, vertices: table, indices: table, texture: texture, z_index: number) -> draw_commandprimitive_topology(integer) – Specifies the type of primitive to be rendered. It determines how the vertices will be connected (e.g., triangles, lines, etc.).vertices(table) – A table containing Vertex objects, each defining a point in 2D or 3D space with position, color, and other attributes.indices(table) – A table of integers representing the order in which vertices should be connected to form the desired shape.texture(texture) - A reference to a texture resource used to sample colors during rendering. This could be a handle or object managed by the graphics system (e.g. a loaded image or material asset).z_index(number) – Specifies the global z-index for the rendered object. Useful for depth sorting in 2D/3D rendering.
Returns a draw_command, which can be used to change the primitive_topology, vertices, and indices later on.
Last updated