Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
// Generated by tools/gen.sh from Blender's own API (tools/dump.py). Don't edit: regenerate.
import type * as H from "../../types";
import type * as M from "../../mathutils";
import type * as R from "../rna";
import type * as E from "../enums";
import type * as P from "../py";
/** This module provides access to the gpu state. */
export interface Api {
/**
* Return the active frame-buffer in context.
* @returns The active framebuffer.
*/
active_framebuffer_get(...args: any[]): H.Ptr<P.gpu_types.GPUFrameBuffer>;
/**
* Current blending equation.
* @returns The current blend mode.
*/
blend_get(...args: any[]): H.Ref<string>;
/**
* Defines the fixed pipeline blending equation.
* @param mode The type of blend mode. * ``NONE`` No blending. * ``ALPHA`` The original color channels are interpolated according to the alpha value. * ``ALPHA_PREMULT`` The original color channels are interpolated according to the alpha value with the new colors pre-multiplied by this value. * ``ADDITIVE`` The original color channels are added by the corresponding ones. * ``ADDITIVE_PREMULT`` The original color channels are added by the corresponding ones that are pre-multiplied by the alpha value. * ``MULTIPLY`` The original color channels are multiplied by the corresponding ones. * ``SUBTRACT`` The original color channels are subtracted by the corresponding ones. * ``INVERT`` The original color channels are replaced by its complementary color.
*/
blend_set(mode: H.In<"NONE" | "ALPHA" | "ALPHA_PREMULT" | "ADDITIVE" | "ADDITIVE_PREMULT" | "MULTIPLY" | "SUBTRACT" | "INVERT">): H.Ref<void>;
/**
* Defines the fixed pipeline blending equation.
* @param mode The type of blend mode. * ``NONE`` No blending. * ``ALPHA`` The original color channels are interpolated according to the alpha value. * ``ALPHA_PREMULT`` The original color channels are interpolated according to the alpha value with the new colors pre-multiplied by this value. * ``ADDITIVE`` The original color channels are added by the corresponding ones. * ``ADDITIVE_PREMULT`` The original color channels are added by the corresponding ones that are pre-multiplied by the alpha value. * ``MULTIPLY`` The original color channels are multiplied by the corresponding ones. * ``SUBTRACT`` The original color channels are subtracted by the corresponding ones. * ``INVERT`` The original color channels are replaced by its complementary color.
*/
blend_set(kw: {
/**
* The type of blend mode.
* * ``NONE`` No blending.
* * ``ALPHA`` The original color channels are interpolated according to the alpha value.
* * ``ALPHA_PREMULT`` The original color channels are interpolated according to the alpha value with the new colors pre-multiplied by this value.
* * ``ADDITIVE`` The original color channels are added by the corresponding ones.
* * ``ADDITIVE_PREMULT`` The original color channels are added by the corresponding ones that are pre-multiplied by the alpha value.
* * ``MULTIPLY`` The original color channels are multiplied by the corresponding ones.
* * ``SUBTRACT`` The original color channels are subtracted by the corresponding ones.
* * ``INVERT`` The original color channels are replaced by its complementary color.
*/
mode: H.In<"NONE" | "ALPHA" | "ALPHA_PREMULT" | "ADDITIVE" | "ADDITIVE_PREMULT" | "MULTIPLY" | "SUBTRACT" | "INVERT">;
}): H.Ref<void>;
/**
* Sets the number of ``gl_ClipDistance`` planes used for clip geometry.
* @param distances_enabled Number of clip distances enabled.
*/
clip_distances_set(distances_enabled: H.In<number>): H.Ref<void>;
/**
* Sets the number of ``gl_ClipDistance`` planes used for clip geometry.
* @param distances_enabled Number of clip distances enabled.
*/
clip_distances_set(kw: {
/** Number of clip distances enabled. */
distances_enabled: H.In<number>;
}): H.Ref<void>;
/**
* Enable or disable writing of frame buffer color components.
* @param r Red component.
* @param g Green component.
* @param b Blue component.
* @param a Alpha component.
*/
color_mask_set(r: H.In<boolean>, g: H.In<boolean>, b: H.In<boolean>, a: H.In<boolean>): H.Ref<void>;
/**
* Enable or disable writing of frame buffer color components.
* @param r Red component.
* @param g Green component.
* @param b Blue component.
* @param a Alpha component.
*/
color_mask_set(kw: {
/** Red component. */
r: H.In<boolean>;
/** Green component. */
g: H.In<boolean>;
/** Blue component. */
b: H.In<boolean>;
/** Alpha component. */
a: H.In<boolean>;
}): H.Ref<void>;
/**
* Writing status in the depth component.
* @returns True if writing to the depth component is enabled.
*/
depth_mask_get(...args: any[]): H.Ref<boolean>;
/**
* Write to depth component.
* @param value True for writing to the depth component.
*/
depth_mask_set(value: H.In<boolean>): H.Ref<void>;
/**
* Write to depth component.
* @param value True for writing to the depth component.
*/
depth_mask_set(kw: {
/** True for writing to the depth component. */
value: H.In<boolean>;
}): H.Ref<void>;
/**
* Current depth_test equation.
* @returns The current depth test mode.
*/
depth_test_get(...args: any[]): H.Ref<string>;
/**
* Defines the depth_test equation.
* @param mode The depth test equation name.
*/
depth_test_set(mode: H.In<"NONE" | "ALWAYS" | "LESS" | "LESS_EQUAL" | "EQUAL" | "GREATER" | "GREATER_EQUAL">): H.Ref<void>;
/**
* Defines the depth_test equation.
* @param mode The depth test equation name.
*/
depth_test_set(kw: {
/** The depth test equation name. */
mode: H.In<"NONE" | "ALWAYS" | "LESS" | "LESS_EQUAL" | "EQUAL" | "GREATER" | "GREATER_EQUAL">;
}): H.Ref<void>;
/**
* Specify whether none, front-facing or back-facing facets can be culled.
* @param culling The face culling mode.
*/
face_culling_set(culling: H.In<"NONE" | "FRONT" | "BACK">): H.Ref<void>;
/**
* Specify whether none, front-facing or back-facing facets can be culled.
* @param culling The face culling mode.
*/
face_culling_set(kw: {
/** The face culling mode. */
culling: H.In<"NONE" | "FRONT" | "BACK">;
}): H.Ref<void>;
/**
* Specifies the orientation of front-facing polygons.
* @param invert True for clockwise polygons as front-facing.
*/
front_facing_set(invert: H.In<boolean>): H.Ref<void>;
/**
* Specifies the orientation of front-facing polygons.
* @param invert True for clockwise polygons as front-facing.
*/
front_facing_set(kw: {
/** True for clockwise polygons as front-facing. */
invert: H.In<boolean>;
}): H.Ref<void>;
/**
* Current width of rasterized lines.
* @returns The current line width.
*/
line_width_get(...args: any[]): H.Ref<number>;
/**
* Specify the width of rasterized lines.
* @param width New width.
*/
line_width_set(width: H.In<number>): H.Ref<void>;
/**
* Specify the width of rasterized lines.
* @param width New width.
*/
line_width_set(kw: {
/** New width. */
width: H.In<number>;
}): H.Ref<void>;
/**
* Specify the diameter of rasterized points.
*
* When ``program_point_size_set(False)`` is set, this sets the ``size``
* uniform of point shaders. Any value set by ``uniform_float("size", ...)``
* on a point shader will be overwritten by this function. Use
* ``program_point_size_set(True)`` to disable this override and control
* point size via ``gl_PointSize`` in the vertex shader.
* @param size New diameter.
*/
point_size_set(size: H.In<number>): H.Ref<void>;
/**
* Specify the diameter of rasterized points.
*
* When ``program_point_size_set(False)`` is set, this sets the ``size``
* uniform of point shaders. Any value set by ``uniform_float("size", ...)``
* on a point shader will be overwritten by this function. Use
* ``program_point_size_set(True)`` to disable this override and control
* point size via ``gl_PointSize`` in the vertex shader.
* @param size New diameter.
*/
point_size_set(kw: {
/** New diameter. */
size: H.In<number>;
}): H.Ref<void>;
/**
* When enabled (True), point size is taken from the shader builtin
* ``gl_PointSize``. When disabled (False), the global state value can
* be applied to the shader ``size`` uniform, overwriting any user-set
* value.
* @param enable True to use shader ``gl_PointSize``, False for global state.
*/
program_point_size_set(enable: H.In<boolean>): H.Ref<void>;
/**
* When enabled (True), point size is taken from the shader builtin
* ``gl_PointSize``. When disabled (False), the global state value can
* be applied to the shader ``size`` uniform, overwriting any user-set
* value.
* @param enable True to use shader ``gl_PointSize``, False for global state.
*/
program_point_size_set(kw: {
/** True to use shader ``gl_PointSize``, False for global state. */
enable: H.In<boolean>;
}): H.Ref<void>;
/**
* Retrieve the scissors of the active framebuffer.
* Note: Only valid between 'scissor_set' and a framebuffer rebind.
* @returns The scissor of the active framebuffer as a tuple
* (x, y, xsize, ysize).
* x, y: lower left corner of the scissor rectangle, in pixels.
* xsize, ysize: width and height of the scissor rectangle.
*/
scissor_get(...args: any[]): H.Ref<[number, number, number, number]>;
/**
* Specifies the scissor area of the active framebuffer.
* Note: The scissor state is not saved upon framebuffer rebind.
* @param x Lower left corner x coordinate, in pixels.
* @param y Lower left corner y coordinate, in pixels.
* @param xsize Width of the scissor rectangle.
* @param ysize Height of the scissor rectangle.
*/
scissor_set(x: H.In<number>, y: H.In<number>, xsize: H.In<number>, ysize: H.In<number>): H.Ref<void>;
/**
* Specifies the scissor area of the active framebuffer.
* Note: The scissor state is not saved upon framebuffer rebind.
* @param x Lower left corner x coordinate, in pixels.
* @param y Lower left corner y coordinate, in pixels.
* @param xsize Width of the scissor rectangle.
* @param ysize Height of the scissor rectangle.
*/
scissor_set(kw: {
/** Lower left corner x coordinate, in pixels. */
x: H.In<number>;
/** Lower left corner y coordinate, in pixels. */
y: H.In<number>;
/** Width of the scissor rectangle. */
xsize: H.In<number>;
/** Height of the scissor rectangle. */
ysize: H.In<number>;
}): H.Ref<void>;
/**
* Enable/disable scissor testing on the active framebuffer.
* @param enable True - enable scissor testing. False - disable scissor testing.
*/
scissor_test_set(enable: H.In<boolean>): H.Ref<void>;
/**
* Enable/disable scissor testing on the active framebuffer.
* @param enable True - enable scissor testing. False - disable scissor testing.
*/
scissor_test_set(kw: {
/**
* True - enable scissor testing.
* False - disable scissor testing.
*/
enable: H.In<boolean>;
}): H.Ref<void>;
/**
* Viewport of the active framebuffer.
* @returns The viewport as a tuple (x, y, xsize, ysize).
*/
viewport_get(...args: any[]): H.Ref<[number, number, number, number]>;
/**
* Specifies the viewport of the active framebuffer.
* Note: The viewport state is not saved upon framebuffer rebind.
* @param x Lower left corner x coordinate, in pixels.
* @param y Lower left corner y coordinate, in pixels.
* @param xsize Width of the viewport.
* @param ysize Height of the viewport.
*/
viewport_set(x: H.In<number>, y: H.In<number>, xsize: H.In<number>, ysize: H.In<number>): H.Ref<void>;
/**
* Specifies the viewport of the active framebuffer.
* Note: The viewport state is not saved upon framebuffer rebind.
* @param x Lower left corner x coordinate, in pixels.
* @param y Lower left corner y coordinate, in pixels.
* @param xsize Width of the viewport.
* @param ysize Height of the viewport.
*/
viewport_set(kw: {
/** Lower left corner x coordinate, in pixels. */
x: H.In<number>;
/** Lower left corner y coordinate, in pixels. */
y: H.In<number>;
/** Width of the viewport. */
xsize: H.In<number>;
/** Height of the viewport. */
ysize: H.In<number>;
}): H.Ref<void>;
}