Graphics functions and constants.
Version: alpha
| RECORDS | |
|---|---|
| graphics.adapter_info | Graphics adapter information |
| graphics.adapter_limits | Graphics context limits |
| ENUMS | |
|---|---|
| graphics.BLEND_EQUATION | Blend equations |
| graphics.BLEND_FACTOR | Blend factors |
| graphics.BUFFER_TYPE | Buffer types |
| graphics.COMPARE_FUNC | Comparison functions |
| graphics.COMPRESSION_TYPE | Texture compression types |
| graphics.CONTEXT_FEATURE | Optional graphics-context features |
| graphics.COORDINATE_SPACE | Vertex attribute coordinate spaces |
| graphics.DATA_TYPE | Vertex attribute data types |
| graphics.FACE_TYPE | Face types |
| graphics.SEMANTIC_TYPE | Vertex attribute semantic types |
| graphics.STATE | Graphics states |
| graphics.STENCIL_OP | Stencil operations |
| graphics.TEXTURE_FILTER | Texture filters |
| graphics.TEXTURE_FORMAT | Texture formats |
| graphics.TEXTURE_TYPE | Texture types |
| graphics.TEXTURE_USAGE_FLAG | Texture usage flags |
| graphics.TEXTURE_WRAP | Texture wrapping modes |
| FUNCTIONS | |
|---|---|
| graphics.get_adapter_info() | get information about the currently installed graphics adapter |
| graphics.get_engine_adapters() | get the list of graphics adapters that have been registered with the engine |
Graphics adapter information
FIELDS
family |
string |
Adapter family name. |
version_major |
integer |
Adapter API major version. |
version_minor |
integer |
Adapter API minor version. |
limits |
graphics.adapter_limits |
Hardware and driver limits. |
extensions |
string[] |
Driver-reported extension names. |
features |
graphics.CONTEXT_FEATURE[] |
Supported optional context features. |
Graphics context limits
FIELDS
max_texture_size_2d |
integer |
Maximum 2D texture dimension in texels. |
max_texture_size_3d |
integer |
Maximum 3D texture dimension in texels. |
max_texture_size_cube |
integer |
Maximum cube-map face dimension in texels. |
max_texture_array_layers |
integer |
Maximum number of array texture layers. |
max_framebuffer_width |
integer |
Maximum framebuffer width in pixels. |
max_framebuffer_height |
integer |
Maximum framebuffer height in pixels. |
max_color_attachments |
integer |
Maximum number of simultaneous color attachments. |
max_samplers_per_stage |
integer |
Maximum number of texture samplers per shader stage. |
max_textures_per_stage |
integer |
Maximum number of sampled textures per shader stage. |
max_vertex_attributes |
integer |
Maximum number of vertex attributes. |
max_vertex_buffers |
integer |
Maximum number of vertex-buffer bindings. |
max_compute_workgroup_size_x |
integer |
Maximum compute workgroup size on the X axis. |
max_compute_workgroup_size_y |
integer |
Maximum compute workgroup size on the Y axis. |
max_compute_workgroup_size_z |
integer |
Maximum compute workgroup size on the Z axis. |
max_compute_workgroup_invocations |
integer |
Maximum invocations per compute workgroup. |
max_compute_shared_memory_size |
integer |
Maximum shared memory per compute workgroup in bytes. |
max_uniform_buffer_range |
integer |
Maximum bindable uniform-buffer range in bytes. |
max_storage_buffer_range |
integer |
Maximum bindable storage-buffer range in bytes. |
graphics.BLEND_EQUATION: integer
Blend equations
VALUES
graphics.BLEND_EQUATION_ADD |
|
graphics.BLEND_EQUATION_MAX |
|
graphics.BLEND_EQUATION_MIN |
|
graphics.BLEND_EQUATION_REVERSE_SUBTRACT |
|
graphics.BLEND_EQUATION_SUBTRACT |
graphics.BLEND_FACTOR: integer
Blend factors
VALUES
graphics.BUFFER_TYPE: integer
Buffer types
VALUES
graphics.COMPARE_FUNC: integer
Comparison functions
VALUES
graphics.COMPRESSION_TYPE: integer
Texture compression types
VALUES
graphics.COMPRESSION_TYPE_BASIS_ETC1S |
|
graphics.COMPRESSION_TYPE_BASIS_UASTC |
|
graphics.COMPRESSION_TYPE_DEFAULT |
|
graphics.COMPRESSION_TYPE_WEBP |
|
graphics.COMPRESSION_TYPE_WEBP_LOSSY |
graphics.CONTEXT_FEATURE: integer
Optional graphics-context features
VALUES
graphics.COORDINATE_SPACE: integer
Vertex attribute coordinate spaces
VALUES
graphics.DATA_TYPE: integer
Vertex attribute data types
VALUES
graphics.FACE_TYPE: integer
Face types
VALUES
graphics.FACE_TYPE_BACK |
back-facing polygons |
graphics.FACE_TYPE_FRONT |
front-facing polygons |
graphics.FACE_TYPE_FRONT_AND_BACK |
both front- and back-facing polygons |
graphics.SEMANTIC_TYPE: integer
Vertex attribute semantic types
VALUES
graphics.STATE: integer
Graphics states
VALUES
graphics.STENCIL_OP: integer
Stencil operations
VALUES
graphics.STENCIL_OP_DECR |
decrement and clamp at zero |
graphics.STENCIL_OP_DECR_WRAP |
decrement and wrap zero to the maximum unsigned value |
graphics.STENCIL_OP_INCR |
increment and clamp at the maximum unsigned value |
graphics.STENCIL_OP_INCR_WRAP |
increment and wrap the maximum unsigned value to zero |
graphics.STENCIL_OP_INVERT |
bitwise invert |
graphics.STENCIL_OP_KEEP |
keep the current value |
graphics.STENCIL_OP_REPLACE |
replace with the reference value from render.set_stencil_func |
graphics.STENCIL_OP_ZERO |
set to zero |
graphics.TEXTURE_FILTER: integer
Texture filters
VALUES
graphics.TEXTURE_FORMAT: integer
Texture formats
VALUES
graphics.TEXTURE_TYPE: integer
Texture types
VALUES
graphics.TEXTURE_USAGE_FLAG: integer
Texture usage flags
VALUES
graphics.TEXTURE_USAGE_FLAG_COLOR |
|
graphics.TEXTURE_USAGE_FLAG_INPUT |
|
graphics.TEXTURE_USAGE_FLAG_MEMORYLESS |
|
graphics.TEXTURE_USAGE_FLAG_SAMPLE |
|
graphics.TEXTURE_USAGE_FLAG_STORAGE |
graphics.TEXTURE_WRAP: integer
Texture wrapping modes
VALUES
graphics.TEXTURE_WRAP_CLAMP_TO_BORDER |
|
graphics.TEXTURE_WRAP_CLAMP_TO_EDGE |
|
graphics.TEXTURE_WRAP_MIRRORED_REPEAT |
|
graphics.TEXTURE_WRAP_REPEAT |
graphics.get_adapter_info()→info:graphics.adapter_info
Returns a table describing the active graphics context: the adapter family, its hardware limits, the list of driver-reported extensions, and the set of optional context features supported by the backend.
PARAMETERS
None
RETURNS
info |
graphics.adapter_info |
information about the active graphics adapter and context |
graphics.get_engine_adapters()→adapters:string[]
get the list of graphics adapters that have been registered with the engine
PARAMETERS
None
RETURNS
adapters |
string[] |
array of adapter family name strings (e.g. "opengl", "vulkan", "webgpu") |