Server for anything visible.
    public static class VisualServer

Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display.

The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed.

Inheritance Chain

Static Fields

    public const Int32 ArrayWeightsSize = 4

    public const Int32 CanvasItemZMax = 4096

    public const Int32 CanvasItemZMin = -4096

    public const Int32 MaterialRenderPriorityMax = 127

    public const Int32 MaterialRenderPriorityMin = -128

    public const Int32 MaxCursors = 8

    public const Int32 MaxGlowLevels = 7

    public const Int32 NoIndexArray = -1

Static Properties

    public static Object Singleton { get; }

Static Methods

    public static void BlackBarsSetImages(RID left, RID top, RID right, RID bottom)

Sets images to be rendered in the window margin.

    public static void BlackBarsSetMargins(int left, int top, int right, int bottom)

Sets margin size, where black bars (or images, if BlackBarsSetImages(Godot.RID, Godot.RID, Godot.RID, Godot.RID) was used) are rendered.

    public static RID CameraCreate()

    public static void CameraSetCullMask(RID camera, int layers)

    public static void CameraSetEnvironment(RID camera, RID env)

    public static void CameraSetOrthogonal(RID camera, float size, float zNear, float zFar)

    public static void CameraSetPerspective(RID camera, float fovyDegrees, float zNear, float zFar)

    public static void CameraSetTransform(RID camera, Transform transform)

    public static void CameraSetUseVerticalAspect(RID camera, bool enable)

    public static RID CanvasCreate()

Creates a canvas and returns the assigned RID.

    public static void CanvasItemAddCircle(RID item, Vector2 pos, float radius, Color color)

Adds a circle command to the CanvasItem’s draw commands.

    public static void CanvasItemAddClipIgnore(RID item, bool ignore)

If ignore is true, the VisualServer does not perform clipping.

    public static void CanvasItemAddLine(RID item, Vector2 from, Vector2 to, Color color, float width = 1f, bool antialiased = false)

Adds a line command to the CanvasItem’s draw commands.

    public static void CanvasItemAddMesh(RID item, RID mesh, RID texture, RID normalMap = null)

Adds a Mesh to the CanvasItem’s draw commands. Only affects its aabb at the moment.

    public static void CanvasItemAddMultimesh(RID item, RID mesh, RID texture, RID normalMap = null)

Adds a MultiMesh to the CanvasItem’s draw commands. Only affects its aabb at the moment.

    public static void CanvasItemAddNinePatch(RID item, Rect2 rect, Rect2 source, RID texture, Vector2 topleft, Vector2 bottomright, NinePatchAxisMode xAxisMode = NinePatchAxisMode.Stretch, NinePatchAxisMode yAxisMode = NinePatchAxisMode.Stretch, bool drawCenter = true, Color? modulate = default(Color?), RID normalMap = null)

Adds a nine patch image to the CanvasItem’s draw commands.

See NinePatchRect for more explanation.

    public static void CanvasItemAddParticles(RID item, RID particles, RID texture, RID normalMap)

Adds a particles system to the CanvasItem’s draw commands.

    public static void CanvasItemAddPolygon(RID item, Vector2[] points, Color[] colors, Vector2[] uvs = null, RID texture = null, RID normalMap = null, bool antialiased = false)

Adds a polygon to the CanvasItem’s draw commands.

    public static void CanvasItemAddPolyline(RID item, Vector2[] points, Color[] colors, float width = 1f, bool antialiased = false)

Adds a polyline, which is a line from multiple points with a width, to the CanvasItem’s draw commands.

    public static void CanvasItemAddPrimitive(RID item, Vector2[] points, Color[] colors, Vector2[] uvs, RID texture, float width = 1f, RID normalMap = null)

Adds a primitive to the CanvasItem’s draw commands.

    public static void CanvasItemAddRect(RID item, Rect2 rect, Color color)

Adds a rectangle to the CanvasItem’s draw commands.

    public static void CanvasItemAddSetTransform(RID item, Transform2D transform)

Adds a Transform2D command to the CanvasItem’s draw commands.

This sets the extra_matrix uniform when executed. This affects the later commands of the canvas item.

    public static void CanvasItemAddTextureRect(RID item, Rect2 rect, RID texture, bool tile = false, Color? modulate = default(Color?), bool transpose = false, RID normalMap = null)

Adds a textured rect to the CanvasItem’s draw commands.

    public static void CanvasItemAddTextureRectRegion(RID item, Rect2 rect, RID texture, Rect2 srcRect, Color? modulate = default(Color?), bool transpose = false, RID normalMap = null, bool clipUv = true)

Adds a texture rect with region setting to the CanvasItem’s draw commands.

    public static void CanvasItemAddTriangleArray(RID item, int[] indices, Vector2[] points, Color[] colors, Vector2[] uvs = null, int[] bones = null, float[] weights = null, RID texture = null, int count = -1, RID normalMap = null)

    public static void CanvasItemClear(RID item)

Clears the CanvasItem and removes all commands in it.

    public static RID CanvasItemCreate()

Creates a new CanvasItem and returns its RID.

    public static void CanvasItemSetClip(RID item, bool clip)

Sets clipping for the CanvasItem.

    public static void CanvasItemSetCopyToBackbuffer(RID item, bool enabled, Rect2 rect)

Sets the CanvasItem to copy a rect to the backbuffer.

    public static void CanvasItemSetCustomRect(RID item, bool useCustomRect, Rect2? rect = default(Rect2?))

Defines a custom drawing rectangle for the CanvasItem.

    public static void CanvasItemSetDistanceFieldMode(RID item, bool enabled)

    public static void CanvasItemSetDrawBehindParent(RID item, bool enabled)

Sets CanvasItem to be drawn behind its parent.

    public static void CanvasItemSetDrawIndex(RID item, int index)

Sets the index for the CanvasItem.

    public static void CanvasItemSetLightMask(RID item, int mask)

The light mask. See LightOccluder2D for more information on light masks.

    public static void CanvasItemSetMaterial(RID item, RID material)

Sets a new material to the CanvasItem.

    public static void CanvasItemSetModulate(RID item, Color color)

Sets the color that modulates the CanvasItem and its children.

    public static void CanvasItemSetParent(RID item, RID parent)

Sets the parent for the CanvasItem.

    public static void CanvasItemSetSelfModulate(RID item, Color color)

Sets the color that modulates the CanvasItem without children.

    public static void CanvasItemSetSortChildrenByY(RID item, bool enabled)

Sets if CanvasItem’s children should be sorted by y-position.

    public static void CanvasItemSetTransform(RID item, Transform2D transform)

Sets the CanvasItem’s Transform2D.

    public static void CanvasItemSetUseParentMaterial(RID item, bool enabled)

Sets if the CanvasItem uses its parent’s material.

    public static void CanvasItemSetVisible(RID item, bool visible)

Sets if the canvas item (including its children) is visible.

    public static void CanvasItemSetZAsRelativeToParent(RID item, bool enabled)

If this is enabled, the z-index of the parent will be added to the children’s z-index.

    public static void CanvasItemSetZIndex(RID item, int zIndex)

Sets the CanvasItem’s z-index, i.e. its draw order (lower indexes are drawn first).

    public static void CanvasLightAttachToCanvas(RID light, RID canvas)

Attaches the canvas light to the canvas. Removes it from its previous canvas.

    public static RID CanvasLightCreate()

Creates a canvas light.

    public static void CanvasLightOccluderAttachToCanvas(RID occluder, RID canvas)

Attaches a light occluder to the canvas. Removes it from its previous canvas.

    public static RID CanvasLightOccluderCreate()

Creates a light occluder.

    public static void CanvasLightOccluderSetEnabled(RID occluder, bool enabled)

Enables or disables light occluder.

    public static void CanvasLightOccluderSetLightMask(RID occluder, int mask)

The light mask. See LightOccluder2D for more information on light masks

    public static void CanvasLightOccluderSetPolygon(RID occluder, RID polygon)

Sets a light occluder’s polygon.

    public static void CanvasLightOccluderSetTransform(RID occluder, Transform2D transform)

Sets a light occluder’s Transform2D.

    public static void CanvasLightSetColor(RID light, Color color)

Sets the color for a light.

    public static void CanvasLightSetEnabled(RID light, bool enabled)

Enables or disables a canvas light.

    public static void CanvasLightSetEnergy(RID light, float energy)

Sets a canvas light’s energy.

    public static void CanvasLightSetHeight(RID light, float height)

Sets a canvas light’s height.

    public static void CanvasLightSetItemCullMask(RID light, int mask)

The light mask. See LightOccluder2D for more information on light masks

    public static void CanvasLightSetItemShadowCullMask(RID light, int mask)

The shadow mask. binary about which layers this canvas light affects which canvas item’s shadows. See LightOccluder2D for more information on light masks.

    public static void CanvasLightSetLayerRange(RID light, int minLayer, int maxLayer)

The layer range that gets rendered with this light.

    public static void CanvasLightSetMode(RID light, CanvasLightMode mode)

The mode of the light, see CANVAS_LIGHT_MODE_* constants.

    public static void CanvasLightSetScale(RID light, float scale)

    public static void CanvasLightSetShadowBufferSize(RID light, int size)

Sets the width of the shadow buffer, size gets scaled to the next power of two for this.

    public static void CanvasLightSetShadowColor(RID light, Color color)

Sets the color of the canvas light’s shadow.

    public static void CanvasLightSetShadowEnabled(RID light, bool enabled)

Enables or disables the canvas light’s shadow.

    public static void CanvasLightSetShadowFilter(RID light, CanvasLightShadowFilter filter)

Sets the canvas light’s shadow’s filter, see CANVAS_LIGHT_SHADOW_FILTER_* constants.

    public static void CanvasLightSetShadowGradientLength(RID light, float length)

Sets the length of the shadow’s gradient.

    public static void CanvasLightSetShadowSmooth(RID light, float smooth)

Smoothens the shadow. The lower, the more smooth.

    public static void CanvasLightSetTexture(RID light, RID texture)

    public static void CanvasLightSetTextureOffset(RID light, Vector2 offset)

    public static void CanvasLightSetTransform(RID light, Transform2D transform)

Sets the canvas light’s Transform2D.

    public static void CanvasLightSetZRange(RID light, int minZ, int maxZ)

    public static RID CanvasOccluderPolygonCreate()

Creates a new light occluder polygon.

    public static void CanvasOccluderPolygonSetCullMode(RID occluderPolygon, CanvasOccluderPolygonCullMode mode)

Sets an occluder polygons cull mode. See CANVAS_OCCLUDER_POLYGON_CULL_MODE_* constants.

    public static void CanvasOccluderPolygonSetShape(RID occluderPolygon, Vector2[] shape, bool closed)

Sets the shape of the occluder polygon.

    public static void CanvasOccluderPolygonSetShapeAsLines(RID occluderPolygon, Vector2[] shape)

Sets the shape of the occluder polygon as lines.

    public static void CanvasSetItemMirroring(RID canvas, RID item, Vector2 mirroring)

A copy of the canvas item will be drawn with a local offset of the mirroring Vector2.

    public static void CanvasSetModulate(RID canvas, Color color)

Modulates all colors in the given canvas.

    public static RID DirectionalLightCreate()

    public static void Draw(bool swapBuffers = true, float frameStep = 0f)

    public static RID EnvironmentCreate()

    public static void EnvironmentSetAdjustment(RID env, bool enable, float brightness, float contrast, float saturation, RID ramp)

    public static void EnvironmentSetAmbientLight(RID env, Color color, float energy = 1f, float skyContibution = 0f)

    public static void EnvironmentSetBackground(RID env, EnvironmentBG bg)

    public static void EnvironmentSetBgColor(RID env, Color color)

    public static void EnvironmentSetBgEnergy(RID env, float energy)

    public static void EnvironmentSetCanvasMaxLayer(RID env, int maxLayer)

    public static void EnvironmentSetDofBlurFar(RID env, bool enable, float distance, float transition, float farAmount, EnvironmentDOFBlurQuality quality)

    public static void EnvironmentSetDofBlurNear(RID env, bool enable, float distance, float transition, float farAmount, EnvironmentDOFBlurQuality quality)

    public static void EnvironmentSetFog(RID env, bool enable, Color color, Color sunColor, float sunAmount)

    public static void EnvironmentSetFogDepth(RID env, bool enable, float depthBegin, float depthEnd, float depthCurve, bool transmit, float transmitCurve)

    public static void EnvironmentSetFogHeight(RID env, bool enable, float minHeight, float maxHeight, float heightCurve)

    public static void EnvironmentSetGlow(RID env, bool enable, int levelFlags, float intensity, float strength, float bloomThreshold, EnvironmentGlowBlendMode blendMode, float hdrBleedThreshold, float hdrBleedScale, float hdrLuminanceCap, bool bicubicUpscale)

    public static void EnvironmentSetSky(RID env, RID sky)

    public static void EnvironmentSetSkyCustomFov(RID env, float scale)

    public static void EnvironmentSetSkyOrientation(RID env, Basis orientation)

    public static void EnvironmentSetSsao(RID env, bool enable, float radius, float intensity, float radius2, float intensity2, float bias, float lightAffect, float aoChannelAffect, Color color, EnvironmentSSAOQuality quality, EnvironmentSSAOBlur blur, float bilateralSharpness)

    public static void EnvironmentSetSsr(RID env, bool enable, int maxSteps, float fadeIn, float fadeOut, float depthTolerance, bool roughness)

    public static void EnvironmentSetTonemap(RID env, EnvironmentToneMapper toneMapper, float exposure, float white, bool autoExposure, float minLuminance, float maxLuminance, float autoExpSpeed, float autoExpGrey)

    public static void Finish()

Removes buffers and clears testcubes.

    public static void ForceDraw(bool swapBuffers = true, float frameStep = 0f)

    public static void ForceSync()

Synchronizes threads.

    public static void FreeRid(RID rid)

Tries to free an object in the VisualServer.

    public static int GetRenderInfo(RenderInfo info)

Returns a certain information, see RENDER_INFO_* for options.

    public static RID GetTestCube()

Returns the id of the test cube. Creates one if none exists.

    public static RID GetTestTexture()

Returns the id of the test texture. Creates one if none exists.

    public static RID GetWhiteTexture()

Returns the id of a white texture. Creates one if none exists.

    public static RID GiProbeCreate()

    public static float GiProbeGetBias(RID probe)

    public static AABB GiProbeGetBounds(RID probe)

    public static float GiProbeGetCellSize(RID probe)

    public static int[] GiProbeGetDynamicData(RID probe)

    public static int GiProbeGetDynamicRange(RID probe)

    public static float GiProbeGetEnergy(RID probe)

    public static float GiProbeGetNormalBias(RID probe)

    public static float GiProbeGetPropagation(RID probe)

    public static Transform GiProbeGetToCellXform(RID probe)

    public static bool GiProbeIsCompressed(RID probe)

    public static bool GiProbeIsInterior(RID probe)

    public static void GiProbeSetBias(RID probe, float bias)

    public static void GiProbeSetBounds(RID probe, AABB bounds)

    public static void GiProbeSetCellSize(RID probe, float range)

    public static void GiProbeSetCompress(RID probe, bool enable)

    public static void GiProbeSetDynamicData(RID probe, int[] data)

    public static void GiProbeSetDynamicRange(RID probe, int range)

    public static void GiProbeSetEnergy(RID probe, float energy)

    public static void GiProbeSetInterior(RID probe, bool enable)

    public static void GiProbeSetNormalBias(RID probe, float bias)

    public static void GiProbeSetPropagation(RID probe, float propagation)

    public static void GiProbeSetToCellXform(RID probe, Transform xform)

    public static bool HasChanged()

Returns true if changes have been made to the VisualServer’s data. Draw(bool, float) is usually called if this happens.

    public static bool HasFeature(Features feature)

    public static bool HasOsFeature(string feature)

Returns true if the OS supports a certain feature. Features might be s3tc, etc, etc2 and pvrtc,

    public static void ImmediateBegin(RID immediate, PrimitiveType primitive, RID texture = null)

    public static void ImmediateClear(RID immediate)

    public static void ImmediateColor(RID immediate, Color color)

    public static RID ImmediateCreate()

    public static void ImmediateEnd(RID immediate)

    public static RID ImmediateGetMaterial(RID immediate)

    public static void ImmediateNormal(RID immediate, Vector3 normal)

    public static void ImmediateSetMaterial(RID immediate, RID material)

    public static void ImmediateTangent(RID immediate, Plane tangent)

    public static void ImmediateUv(RID immediate, Vector2 texUv)

    public static void ImmediateUv2(RID immediate, Vector2 texUv)

    public static void ImmediateVertex(RID immediate, Vector3 vertex)

    public static void ImmediateVertex2d(RID immediate, Vector2 vertex)

    public static void Init()

Initializes the visual server.

    public static void InstanceAttachObjectInstanceId(RID instance, int id)

    public static void InstanceAttachSkeleton(RID instance, RID skeleton)

    public static RID InstanceCreate()

    public static RID InstanceCreate2(RID @base, RID scenario)

    public static void InstanceGeometrySetAsInstanceLod(RID instance, RID asLodOfInstance)

    public static void InstanceGeometrySetCastShadowsSetting(RID instance, ShadowCastingSetting shadowCastingSetting)

    public static void InstanceGeometrySetDrawRange(RID instance, float min, float max, float minMargin, float maxMargin)

    public static void InstanceGeometrySetFlag(RID instance, InstanceFlags flag, bool enabled)

    public static void InstanceGeometrySetMaterialOverride(RID instance, RID material)

    public static Godot.Collections.Array InstancesCullAabb(AABB aabb, RID scenario = null)

    public static Godot.Collections.Array InstancesCullConvex(Godot.Collections.Array convex, RID scenario = null)

    public static Godot.Collections.Array InstancesCullRay(Vector3 from, Vector3 to, RID scenario = null)

    public static void InstanceSetBase(RID instance, RID @base)

    public static void InstanceSetBlendShapeWeight(RID instance, int shape, float weight)

    public static void InstanceSetCustomAabb(RID instance, AABB aabb)

    public static void InstanceSetExterior(RID instance, bool enabled)

    public static void InstanceSetExtraVisibilityMargin(RID instance, float margin)

    public static void InstanceSetLayerMask(RID instance, int mask)

    public static void InstanceSetScenario(RID instance, RID scenario)

    public static void InstanceSetSurfaceMaterial(RID instance, int surface, RID material)

    public static void InstanceSetTransform(RID instance, Transform transform)

    public static void InstanceSetUseLightmap(RID instance, RID lightmapInstance, RID lightmap)

    public static void InstanceSetVisible(RID instance, bool visible)

    public static void LightDirectionalSetBlendSplits(RID light, bool enable)

    public static void LightDirectionalSetShadowDepthRangeMode(RID light, LightDirectionalShadowDepthRangeMode rangeMode)

    public static void LightDirectionalSetShadowMode(RID light, LightDirectionalShadowMode mode)

    public static RID LightmapCaptureCreate()

    public static AABB LightmapCaptureGetBounds(RID capture)

    public static float LightmapCaptureGetEnergy(RID capture)

    public static byte[] LightmapCaptureGetOctree(RID capture)

    public static int LightmapCaptureGetOctreeCellSubdiv(RID capture)

    public static Transform LightmapCaptureGetOctreeCellTransform(RID capture)

    public static void LightmapCaptureSetBounds(RID capture, AABB bounds)

    public static void LightmapCaptureSetEnergy(RID capture, float energy)

    public static void LightmapCaptureSetOctree(RID capture, byte[] octree)

    public static void LightmapCaptureSetOctreeCellSubdiv(RID capture, int subdiv)

    public static void LightmapCaptureSetOctreeCellTransform(RID capture, Transform xform)

    public static void LightOmniSetShadowDetail(RID light, LightOmniShadowDetail detail)

    public static void LightOmniSetShadowMode(RID light, LightOmniShadowMode mode)

    public static void LightSetColor(RID light, Color color)

    public static void LightSetCullMask(RID light, int mask)

    public static void LightSetNegative(RID light, bool enable)

    public static void LightSetParam(RID light, LightParam param, float value)

    public static void LightSetProjector(RID light, RID texture)

    public static void LightSetReverseCullFaceMode(RID light, bool enabled)

    public static void LightSetShadow(RID light, bool enabled)

    public static void LightSetShadowColor(RID light, Color color)

    public static RID MakeSphereMesh(int latitudes, int longitudes, float radius)

Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions.

    public static RID MaterialCreate()

Returns an empty material.

    public static object MaterialGetParam(RID material, string parameter)

Returns the value of a certain material’s parameter.

    public static object MaterialGetParamDefault(RID material, string parameter)

    public static RID MaterialGetShader(RID shaderMaterial)

Returns the shader of a certain material’s shader. Returns an empty RID if the material doesn’t have a shader.

    public static void MaterialSetLineWidth(RID material, float width)

Sets a materials line width.

    public static void MaterialSetNextPass(RID material, RID nextMaterial)

Sets an objects next material.

    public static void MaterialSetParam(RID material, string parameter, object value)

Sets a materials parameter.

    public static void MaterialSetRenderPriority(RID material, int priority)

Sets a material’s render priority.

    public static void MaterialSetShader(RID shaderMaterial, RID shader)

Sets a shader material’s shader.

    public static void MeshAddSurfaceFromArrays(RID mesh, PrimitiveType primtive, Godot.Collections.Array arrays, Godot.Collections.Array blendShapes = null, int compressFormat = 97280)

Adds a surface generated from the Arrays to a mesh. See PRIMITIVE_TYPE_* constants for types.

    public static void MeshClear(RID mesh)

Removes all surfaces from a mesh.

    public static RID MeshCreate()

Creates a new mesh.

    public static int MeshGetBlendShapeCount(RID mesh)

Returns a mesh’s blend shape count.

    public static BlendShapeMode MeshGetBlendShapeMode(RID mesh)

Returns a mesh’s blend shape mode.

    public static AABB MeshGetCustomAabb(RID mesh)

Returns a mesh’s custom aabb.

    public static int MeshGetSurfaceCount(RID mesh)

Returns a mesh’s number of surfaces.

    public static void MeshRemoveSurface(RID mesh, int index)

Removes a mesh’s surface.

    public static void MeshSetBlendShapeCount(RID mesh, int amount)

Sets a mesh’s blend shape count.

    public static void MeshSetBlendShapeMode(RID mesh, BlendShapeMode mode)

Sets a mesh’s blend shape mode.

    public static void MeshSetCustomAabb(RID mesh, AABB aabb)

Sets a mesh’s custom aabb.

    public static AABB MeshSurfaceGetAabb(RID mesh, int surface)

Returns a mesh’s surface’s aabb.

    public static byte[] MeshSurfaceGetArray(RID mesh, int surface)

Returns a mesh’s surface’s vertex buffer.

    public static int MeshSurfaceGetArrayIndexLen(RID mesh, int surface)

Returns a mesh’s surface’s amount of indices.

    public static int MeshSurfaceGetArrayLen(RID mesh, int surface)

Returns a mesh’s surface’s amount of vertices.

    public static Godot.Collections.Array MeshSurfaceGetArrays(RID mesh, int surface)

Returns a mesh’s surface’s buffer arrays.

    public static Godot.Collections.Array MeshSurfaceGetBlendShapeArrays(RID mesh, int surface)

Returns a mesh’s surface’s arrays for blend shapes

    public static int MeshSurfaceGetFormat(RID mesh, int surface)

Returns the format of a mesh’s surface.

    public static int MeshSurfaceGetFormatOffset(int format, int vertexLen, int indexLen, int arrayIndex)

    public static int MeshSurfaceGetFormatStride(int format, int vertexLen, int indexLen)

    public static byte[] MeshSurfaceGetIndexArray(RID mesh, int surface)

Returns a mesh’s surface’s index buffer.

    public static RID MeshSurfaceGetMaterial(RID mesh, int surface)

Returns a mesh’s surface’s material.

    public static PrimitiveType MeshSurfaceGetPrimitiveType(RID mesh, int surface)

Returns the primitive type of a mesh’s surface.

    public static Godot.Collections.Array MeshSurfaceGetSkeletonAabb(RID mesh, int surface)

Returns the aabb of a mesh’s surface’s skeleton.

    public static void MeshSurfaceSetMaterial(RID mesh, int surface, RID material)

Sets a mesh’s surface’s material.

    public static void MeshSurfaceUpdateRegion(RID mesh, int surface, int offset, byte[] data)

    public static void MultimeshAllocate(RID multimesh, int instances, MultimeshTransformFormat transformFormat, MultimeshColorFormat colorFormat, MultimeshCustomDataFormat customDataFormat = MultimeshCustomDataFormat.None)

    public static AABB MultimeshGetAabb(RID multimesh)

    public static int MultimeshGetInstanceCount(RID multimesh)

    public static RID MultimeshGetMesh(RID multimesh)

    public static int MultimeshGetVisibleInstances(RID multimesh)

    public static Color MultimeshInstanceGetColor(RID multimesh, int index)

    public static Color MultimeshInstanceGetCustomData(RID multimesh, int index)

    public static Transform MultimeshInstanceGetTransform(RID multimesh, int index)

    public static Transform2D MultimeshInstanceGetTransform2d(RID multimesh, int index)

    public static void MultimeshInstanceSetColor(RID multimesh, int index, Color color)

    public static void MultimeshInstanceSetCustomData(RID multimesh, int index, Color customData)

    public static void MultimeshInstanceSetTransform(RID multimesh, int index, Transform transform)

    public static void MultimeshInstanceSetTransform2d(RID multimesh, int index, Transform2D transform)

    public static void MultimeshSetAsBulkArray(RID multimesh, float[] array)

    public static void MultimeshSetMesh(RID multimesh, RID mesh)

    public static void MultimeshSetVisibleInstances(RID multimesh, int visible)

    public static RID OmniLightCreate()

    public static RID ParticlesCreate()

    public static AABB ParticlesGetCurrentAabb(RID particles)

    public static bool ParticlesGetEmitting(RID particles)

    public static void ParticlesRestart(RID particles)

    public static void ParticlesSetAmount(RID particles, int amount)

    public static void ParticlesSetCustomAabb(RID particles, AABB aabb)

    public static void ParticlesSetDrawOrder(RID particles, ParticlesDrawOrder order)

    public static void ParticlesSetDrawPasses(RID particles, int count)

    public static void ParticlesSetDrawPassMesh(RID particles, int pass, RID mesh)

    public static void ParticlesSetEmissionTransform(RID particles, Transform transform)

    public static void ParticlesSetEmitting(RID particles, bool emitting)

    public static void ParticlesSetExplosivenessRatio(RID particles, float ratio)

    public static void ParticlesSetFixedFps(RID particles, int fps)

    public static void ParticlesSetFractionalDelta(RID particles, bool enable)

    public static void ParticlesSetLifetime(RID particles, float lifetime)

    public static void ParticlesSetOneShot(RID particles, bool oneShot)

    public static void ParticlesSetPreProcessTime(RID particles, float time)

    public static void ParticlesSetProcessMaterial(RID particles, RID material)

    public static void ParticlesSetRandomnessRatio(RID particles, float ratio)

    public static void ParticlesSetSpeedScale(RID particles, float scale)

    public static void ParticlesSetUseLocalCoordinates(RID particles, bool enable)

    public static RID ReflectionProbeCreate()

    public static void ReflectionProbeSetAsInterior(RID probe, bool enable)

    public static void ReflectionProbeSetCullMask(RID probe, int layers)

    public static void ReflectionProbeSetEnableBoxProjection(RID probe, bool enable)

    public static void ReflectionProbeSetEnableShadows(RID probe, bool enable)

    public static void ReflectionProbeSetExtents(RID probe, Vector3 extents)

    public static void ReflectionProbeSetIntensity(RID probe, float intensity)

    public static void ReflectionProbeSetInteriorAmbient(RID probe, Color color)

    public static void ReflectionProbeSetInteriorAmbientEnergy(RID probe, float energy)

    public static void ReflectionProbeSetInteriorAmbientProbeContribution(RID probe, float contrib)

    public static void ReflectionProbeSetMaxDistance(RID probe, float distance)

    public static void ReflectionProbeSetOriginOffset(RID probe, Vector3 offset)

    public static void ReflectionProbeSetUpdateMode(RID probe, ReflectionProbeUpdateMode mode)

    public static void RequestFrameDrawnCallback(Object where, string method, object userdata)

Schedules a callback to the corresponding named ‘method’ on ‘where’ after a frame has been drawn.

The callback method must use only 1 argument which will be called with ‘userdata’.

    public static RID ScenarioCreate()

    public static void ScenarioSetDebug(RID scenario, ScenarioDebugMode debugMode)

    public static void ScenarioSetEnvironment(RID scenario, RID environment)

    public static void ScenarioSetFallbackEnvironment(RID scenario, RID environment)

    public static void ScenarioSetReflectionAtlasSize(RID scenario, int size, int subdiv)

    public static void SetBootImage(Image image, Color color, bool scale)

Sets a boot image. The color defines the background color and if scale is true the image will be scaled to fit the screen size.

    public static void SetDebugGenerateWireframes(bool generate)

    public static void SetDefaultClearColor(Color color)

    public static RID ShaderCreate()

Creates an empty shader.

    public static string ShaderGetCode(RID shader)

Returns a shader’s code.

    public static RID ShaderGetDefaultTextureParam(RID shader, string name)

Returns a default texture from a shader searched by name.

    public static Godot.Collections.Array ShaderGetParamList(RID shader)

Returns the parameters of a shader.

    public static void ShaderSetCode(RID shader, string code)

Sets a shader’s code.

    public static void ShaderSetDefaultTextureParam(RID shader, string name, RID texture)

Sets a shader’s default texture. Overwrites the texture given by name.

    public static void SkeletonAllocate(RID skeleton, int bones, bool is2dSkeleton = false)

    public static Transform SkeletonBoneGetTransform(RID skeleton, int bone)

    public static Transform2D SkeletonBoneGetTransform2d(RID skeleton, int bone)

    public static void SkeletonBoneSetTransform(RID skeleton, int bone, Transform transform)

    public static void SkeletonBoneSetTransform2d(RID skeleton, int bone, Transform2D transform)

    public static RID SkeletonCreate()

    public static int SkeletonGetBoneCount(RID skeleton)

    public static RID SkyCreate()

Creates an empty sky.

    public static void SkySetTexture(RID sky, RID cubeMap, int radianceSize)

Sets a sky’s texture.

    public static RID SpotLightCreate()

    public static void Sync()

    public static void TextureAllocate(RID texture, int width, int height, int depth3d, Image.Format format, TextureType type, int flags = 7)

    public static RID TextureCreate()

Creates an empty texture.

    public static RID TextureCreateFromImage(Image image, int flags = 7)

Creates a texture, allocates the space for an image, and fills in the image.

    public static Godot.Collections.Array TextureDebugUsage()

Returns a list of all the textures and their information.

    public static Image TextureGetData(RID texture, int cubeSide = 0)

Returns a copy of a texture’s image unless it’s a CubeMap, in which case it returns the RID of the image at one of the cubes sides.

    public static int TextureGetDepth(RID texture)

    public static int TextureGetFlags(RID texture)

Returns the flags of a texture.

    public static Image.Format TextureGetFormat(RID texture)

Returns the format of the texture’s image.

    public static int TextureGetHeight(RID texture)

Returns the texture’s height.

    public static string TextureGetPath(RID texture)

Returns the texture’s path.

    public static int TextureGetTexid(RID texture)

Returns the opengl id of the texture’s image.

    public static TextureType TextureGetType(RID texture)

    public static int TextureGetWidth(RID texture)

Returns the texture’s width.

    public static void TextureSetData(RID texture, Image image, int layer = 0)

Sets the texture’s image data. If it’s a CubeMap, it sets the image data at a cube side.

    public static void TextureSetDataPartial(RID texture, Image image, int srcX, int srcY, int srcW, int srcH, int dstX, int dstY, int dstMip, int layer = 0)

    public static void TextureSetFlags(RID texture, int flags)

Sets the texture’s flags. See TextureFlags for options

    public static void TextureSetPath(RID texture, string path)

Sets the texture’s path.

    public static void TextureSetShrinkAllX2OnSetData(bool shrink)

If true, sets internal processes to shrink all image data to half the size.

    public static void TextureSetSizeOverride(RID texture, int width, int height, int depth)

    public static void TexturesKeepOriginal(bool enable)

If true, the image will be stored in the texture’s images array if overwritten.

    public static void ViewportAttachCamera(RID viewport, RID camera)

Sets a viewport’s camera.

    public static void ViewportAttachCanvas(RID viewport, RID canvas)

Sets a viewport’s canvas.

    public static void ViewportAttachToScreen(RID viewport, Rect2? rect = default(Rect2?), int screen = 0)

Attaches a viewport to a screen.

    public static RID ViewportCreate()

Creates an empty viewport.

    public static void ViewportDetach(RID viewport)

Detaches the viewport from the screen.

    public static int ViewportGetRenderInfo(RID viewport, ViewportRenderInfo info)

Returns a viewport’s render info. for options see VIEWPORT_RENDER_INFO* constants.

    public static RID ViewportGetTexture(RID viewport)

Returns the viewport’s last rendered frame.

    public static void ViewportRemoveCanvas(RID viewport, RID canvas)

Detaches a viewport from a canvas and vice versa.

    public static void ViewportSetActive(RID viewport, bool active)

If true, sets the viewport active, else sets it inactive.

    public static void ViewportSetCanvasStacking(RID viewport, RID canvas, int layer, int sublayer)

Sets the stacking order for a viewport’s canvas.

layer is the actual canvas layer, while sublayer specifies the stacking order of the canvas among those in the same layer.

    public static void ViewportSetCanvasTransform(RID viewport, RID canvas, Transform2D offset)

Sets the transformation of a viewport’s canvas.

    public static void ViewportSetClearMode(RID viewport, ViewportClearMode clearMode)

Sets the clear mode of a viewport. See ViewportClearMode for options.

    public static void ViewportSetDebugDraw(RID viewport, ViewportDebugDraw draw)

Sets the debug draw mode of a viewport. See ViewportDebugDraw for options.

    public static void ViewportSetDisable3d(RID viewport, bool disabled)

If true, a viewport’s 3D rendering is disabled.

    public static void ViewportSetDisableEnvironment(RID viewport, bool disabled)

If true, rendering of a viewport’s environment is disabled.

    public static void ViewportSetGlobalCanvasTransform(RID viewport, Transform2D transform)

Sets the viewport’s global transformation matrix.

    public static void ViewportSetHdr(RID viewport, bool enabled)

If true, the viewport renders to hdr.

    public static void ViewportSetHideCanvas(RID viewport, bool hidden)

If true, the viewport’s canvas is not rendered.

    public static void ViewportSetHideScenario(RID viewport, bool hidden)

    public static void ViewportSetMsaa(RID viewport, ViewportMSAA msaa)

Sets the anti-aliasing mode. see ViewportMSAA for options.

    public static void ViewportSetParentViewport(RID viewport, RID parentViewport)

Sets the viewport’s parent to another viewport.

    public static void ViewportSetScenario(RID viewport, RID scenario)

Sets a viewport’s scenario.

The scenario contains information about the ScenarioDebugMode, environment information, reflection atlas etc.

    public static void ViewportSetShadowAtlasQuadrantSubdivision(RID viewport, int quadrant, int subdivision)

Sets the shadow atlas quadrant’s subdivision.

    public static void ViewportSetShadowAtlasSize(RID viewport, int size)

Sets the size of the shadow atlas’s images.

    public static void ViewportSetSize(RID viewport, int width, int height)

Sets the viewport’s width and height.

    public static void ViewportSetTransparentBackground(RID viewport, bool enabled)

If true, the viewport renders its background as transparent.

    public static void ViewportSetUpdateMode(RID viewport, ViewportUpdateMode updateMode)

Sets when the viewport should be updated. See ViewportUpdateMode constants for options.

    public static void ViewportSetUsage(RID viewport, ViewportUsage usage)

Sets the viewport’s 2D/3D mode. See ViewportUsage constants for options.

    public static void ViewportSetUseArvr(RID viewport, bool useArvr)

If true, the viewport uses augmented or virtual reality technologies. See ARVRInterface.

    public static void ViewportSetVflip(RID viewport, bool enabled)

If true, the viewport’s rendering is flipped vertically.

Signals

    "frame_post_draw" ()

    "frame_pre_draw" ()

Inner Types

ArrayFormat

Name Value Description
FormatVertex 1 Flag used to mark a vertex array.
FormatNormal 2 Flag used to mark a normal array.
FormatTangent 4 Flag used to mark a tangent array.
FormatColor 8 Flag used to mark a color array.
FormatTexUv 16 Flag used to mark a uv coordinates array.
FormatTexUv2 32 Flag used to mark a uv coordinates array for the second uv coordinates.
FormatBones 64 Flag used to mark a bone information array.
FormatWeights 128 Flag used to mark a weights array.
FormatIndex 256 Flag used to mark a index array.
CompressVertex 512 Flag used to mark a compressed (half float) vertex array.
CompressNormal 1024 Flag used to mark a compressed (half float) normal array.
CompressTangent 2048 Flag used to mark a compressed (half float) tangent array.
CompressColor 4096 Flag used to mark a compressed (half float) color array.
CompressTexUv 8192 Flag used to mark a compressed (half float) uv coordinates array.
CompressTexUv2 16384 Flag used to mark a compressed (half float) uv coordinates array for the second uv coordinates.
CompressBones 32768  
CompressWeights 65536 Flag used to mark a compressed (half float) weight array.
CompressIndex 131072  
FlagUse2dVertices 262144 Flag used to mark that the array contains 2D vertices.
FlagUse16BitBones 524288 Flag used to mark that the array uses 16 bit bones instead of 8 bit.
CompressDefault 97280 Used to set flags ARRAY_COMPRESS_VERTEX, ARRAY_COMPRESS_NORMAL, ARRAY_COMPRESS_TANGENT, ARRAY_COMPRESS_COLOR, ARRAY_COMPRESS_TEX_UV, ARRAY_COMPRESS_TEX_UV2 and ARRAY_COMPRESS_WEIGHTS quickly.

ArrayType

Name Value Description
Vertex 0 Array is a vertex array.
Normal 1 Array is a normal array.
Tangent 2 Array is a tangent array.
Color 3 Array is a color array.
TexUv 4 Array is a uv coordinates array.
TexUv2 5 Array is a uv coordinates array for the second uv coordinates.
Bones 6 Array contains bone information.
Weights 7 Array is weight information.
Index 8 Array is index array.
Max 9 Marks the maximum of the array types. Used internally.

BlendShapeMode

Name Value Description
Normalized 0  
Relative 1  

CanvasLightMode

Name Value Description
Add 0 Adds light color additive to the canvas.
Sub 1 Adds light color subtractive to the canvas.
Mix 2 The light adds color depending on transparency.
Mask 3 The light adds color depending on mask.

CanvasLightShadowFilter

Name Value Description
None 0  
Pcf3 1  
Pcf5 2  
Pcf7 3  
Pcf9 4  
Pcf13 5  

CanvasOccluderPolygonCullMode

Name Value Description
Disabled 0 Culling of the canvas occluder is disabled.
Clockwise 1 Culling of the canvas occluder is clockwise.
CounterClockwise 2 Culling of the canvas occluder is counterclockwise.

CubeMapSide

Name Value Description
Left 0 Marks the left side of a cubemap.
Right 1 Marks the right side of a cubemap.
Bottom 2 Marks the bottom side of a cubemap.
Top 3 Marks the top side of a cubemap.
Front 4 Marks the front side of a cubemap.
Back 5 Marks the back side of a cubemap.

EnvironmentBG

Name Value Description
ClearColor 0  
Color 1  
Sky 2  
ColorSky 3  
Canvas 4  
Keep 5  
Max 6  

EnvironmentDOFBlurQuality

Name Value Description
Low 0  
Medium 1  
High 2  

EnvironmentGlowBlendMode

Name Value Description
Additive 0  
Screen 1  
Softlight 2  
Replace 3  

EnvironmentSSAOBlur

Name Value Description
Disabled 0  
Blur1x1    
Blur2x2    
Blur3x3    

EnvironmentSSAOQuality

Name Value Description
Low 0  
Medium 1  
High 2  

EnvironmentToneMapper

Name Value Description
Linear 0  
Reinhard 1  
Filmic 2  
Aces 3  

Features

Name Value Description
Shaders 0  
Multithreaded 1  

InstanceFlags

Name Value Description
UseBakedLight 0  
DrawNextFrameIfVisible 1  
Max 2  

InstanceType

Name Value Description
None 0 The instance does not have a type.
Mesh 1 The instance is a mesh.
Multimesh 2 The instance is a multimesh.
Immediate 3 The instance is an immediate geometry.
Particles 4 The instance is a particle emitter.
Light 5 The instance is a light.
ReflectionProbe 6  
GiProbe 7  
LightmapCapture 8  
Max 9 The max value for INSTANCE_* constants, used internally.
GeometryMask 30 A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).

LightDirectionalShadowDepthRangeMode

Name Value Description
Stable 0  
Optimized 1  

LightDirectionalShadowMode

Name Value Description
Orthogonal 0  
Parallel2Splits 1  
Parallel4Splits 2  

LightOmniShadowDetail

Name Value Description
Vertical 0  
Horizontal 1  

LightOmniShadowMode

Name Value Description
DualParaboloid 0  
Cube 1  

LightParam

Name Value Description
Energy 0 The light’s energy.
Specular 2 The light’s influence on specularity.
Range 3 The light’s range.
Attenuation 4 The light’s attenuation.
SpotAngle 5 The spotlight’s angle.
SpotAttenuation 6 The spotlight’s attenuation.
ContactShadowSize 7 Scales the shadow color.
ShadowMaxDistance 8  
ShadowSplit1Offset 9  
ShadowSplit2Offset 10  
ShadowSplit3Offset 11  
ShadowNormalBias 12  
ShadowBias 13  
ShadowBiasSplitScale 14  
Max 15 The light parameters endpoint. Used internally.

LightType

Name Value Description
Directional 0 Is a directional (sun) light.
Omni 1 is an omni light.
Spot 2 is an spot light.

MultimeshColorFormat

Name Value Description
None 0  
Color8bit    
Float 2  

MultimeshCustomDataFormat

Name Value Description
None 0  
Data8bit    
Float 2  

MultimeshTransformFormat

Name Value Description
Transform2d    
Transform3d    

NinePatchAxisMode

Name Value Description
Stretch 0 The nine patch gets stretched where needed.
Tile 1 The nine patch gets filled with tiles where needed.
TileFit 2 The nine patch gets filled with tiles where needed and stretches them a bit if needed.

ParticlesDrawOrder

Name Value Description
Index 0  
Lifetime 1  
ViewDepth 2  

PrimitiveType

Name Value Description
Points 0 Primitive to draw consists of points.
Lines 1 Primitive to draw consists of lines.
LineStrip 2 Primitive to draw consists of a line strip from start to end.
LineLoop 3 Primitive to draw consists of a line loop (a line strip with a line between the last and the first vertex).
Triangles 4 Primitive to draw consists of triangles.
TriangleStrip 5 Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle).
TriangleFan 6 Primitive to draw consists of a triangle strip (the last 2 vertices are always combined with the first to make a triangle).
Max 7 Marks the primitive types endpoint. used internally.

ReflectionProbeUpdateMode

Name Value Description
Once 0  
Always 1  

RenderInfo

Name Value Description
ObjectsInFrame 0 The amount of objects in the frame.
VerticesInFrame 1 The amount of vertices in the frame.
MaterialChangesInFrame 2 The amount of modified materials in the frame.
ShaderChangesInFrame 3 The amount of shader rebinds in the frame.
SurfaceChangesInFrame 4 The amount of surface changes in the frame.
DrawCallsInFrame 5 The amount of draw calls in frame.
UsageVideoMemTotal 6  
VideoMemUsed 7 The amount of vertex memory and texture memory used.
TextureMemUsed 8 The amount of texture memory used.
VertexMemUsed 9 The amount of vertex memory used.

ScenarioDebugMode

Name Value Description
Disabled 0  
Wireframe 1  
Overdraw 2  
Shadeless 3  

ShaderMode

Name Value Description
Spatial 0 Shader is a 3D shader.
CanvasItem 1 Shader is a 2D shader.
Particles 2 Shader is a particle shader.
Max 3 Marks maximum of the shader types array. used internally.

ShadowCastingSetting

Name Value Description
Off 0  
On 1  
DoubleSided 2  
ShadowsOnly 3  

TextureFlags

Name Value Description
Mipmaps    
Repeat    
Filter    
AnisotropicFilter    
ConvertToLinear    
MirroredRepeat    
UsedForStreaming    
Default    

TextureType

Name Value Description
Type2d    
Cubemap 1  
Type2dArray    
Type3d    

ViewportClearMode

Name Value Description
Always 0 The viewport is always cleared before drawing.
Never 1 The viewport is never cleared before drawing.
OnlyNextFrame 2 The viewport is cleared once, then the clear mode is set to [code]VIEWPORT_CLEAR_NEVER[/code].

ViewportDebugDraw

Name Value Description
Disabled 0 Debug draw is disabled. Default setting.
Unshaded 1 Debug draw sets objects to unshaded.
Overdraw 2 Overwrites clear color to code[/code].
Wireframe 3 Debug draw draws objects in wireframe.

ViewportMSAA

Name Value Description
Disabled 0 Multisample antialiasing is disabled.
Msaa2x    
Msaa4x    
Msaa8x    
Msaa16x    

ViewportRenderInfo

Name Value Description
ObjectsInFrame 0  
VerticesInFrame 1  
MaterialChangesInFrame 2  
ShaderChangesInFrame 3  
SurfaceChangesInFrame 4  
DrawCallsInFrame 5  
Max 6 Marks end of VIEWPORT_RENDER_INFO* constants. Used internally.

ViewportUpdateMode

Name Value Description
Disabled 0  
Once 1  
WhenVisible 2  
Always 3  

ViewportUsage

Name Value Description
Usage2d    
Usage2dNoSampling    
Usage3d    
Usage3dNoEffects    
Tags: