Render

Namespace: dmRender Language: C++ Type: Defold C++ File: render.h Source: engine/render/src/dmsdk/render/render.h Include: dmsdk/render/render.h

Api for render specific data

API

AddToRender

Type: FUNCTION Adds a render object to the current render frame

Parameters

Returns

ApplyMaterialConstants

Type: FUNCTION

Parameters

ApplyMaterialSampler

Type: FUNCTION

Parameters

ClearMaterialTags

Type: FUNCTION

Parameters

ClearNamedConstantBuffer

Type: FUNCTION Clears a named constant buffer from any constants.

Parameters

DeleteConstant

Type: FUNCTION Deletes a shader program constant

Parameters

DeleteMaterial

Type: FUNCTION

Parameters

DeleteNamedConstantBuffer

Type: FUNCTION Deletes a named constant buffer

Parameters

dmRender::GetMaterialVertexSpace

Type: FUNCTION Get the vertex space (local or world)

Parameters

Returns

dmRender::RenderObject::MAX_TEXTURE_COUNT

Type: CONSTANT The maximum number of textures the render object can hold (currently 8)

FrustumOptions

Type: STRUCT Frustum options used when setting up a draw call

Members

FrustumPlanes

Type: ENUM Frustum planes to use in a frustum

Members

GetConstantLocation

Type: FUNCTION Gets the shader program constant location

Parameters

Returns

GetConstantName

Type: FUNCTION Gets the shader program constant name

Parameters

Returns

GetConstantName

Type: FUNCTION Gets the shader program constant name

Parameters

GetConstantType

Type: FUNCTION Gets the type of the constant

Parameters

Returns

GetConstantValues

Type: FUNCTION Gets the shader program constant values

Parameters

Returns

GetMaterialSampler

Type: FUNCTION

GetMaterialSamplerNameHash

Type: FUNCTION

Parameters

Returns

GetMaterialSamplerUnit

Type: FUNCTION

Parameters

Returns

GetMaterialTagListKey

Type: FUNCTION Gets the key to the material tag list

Parameters

Returns

GetNamedConstant

Type: FUNCTION Gets a named constant from the buffer

Notes

Parameters

Returns

GetNamedConstant

Type: FUNCTION Gets a named constant from the buffer - with type information

Notes

Parameters

Returns

GetNamedConstantCount

Type: FUNCTION Gets number of constants in the buffer

Parameters

Returns

GetViewMatrix

Type: FUNCTION

Parameters

Returns

HConstant

Type: TYPEDEF Shader constant handle

HFont

Type: TYPEDEF Font map handle

HMaterial

Type: TYPEDEF Material instance handle

HNamedConstantBuffer

Type: TYPEDEF Shader constant buffer handle. Holds name and values for a constant.

HRenderContext

Type: TYPEDEF The render context

HRenderListDispatch

Type: TYPEDEF Render dispatch function handle.

IterateNamedConstants

Type: FUNCTION Iterates over the constants

Parameters

IterateNamedConstantsFn

Type: TYPEDEF

Parameters

NewConstant

Type: FUNCTION Creates a shader program constant

Parameters

Returns

NewMaterial

Type: FUNCTION

Parameters

Returns

NewNamedConstantBuffer

Type: FUNCTION Allocates a named constant buffer

Returns

RemoveNamedConstant

Type: FUNCTION Removes a named constant from the buffer

Parameters

RenderListAlloc

Type: FUNCTION Allocates an array of render entries

Notes

Parameters

Returns

RenderListDispatchFn

Type: TYPEDEF Render dispatch function callback.

Parameters

RenderListDispatchParams

Type: STRUCT Render dispatch function callback.

Members

RenderListEntry

Type: FUNCTION Represents a renderable object (e.g. a single sprite) The renderer will (each frame) collect all entries with the current material tag, then batch these objects together. Batching is done based on the batch key and Z value (or order for GUI nodes) The caller will also register a callback function where the batched entries will be returned. Each callback then represents a draw call, and will register a RenderObject

Parameters

RenderListMakeDispatch

Type: FUNCTION Register a render dispatch function

Parameters

Returns

RenderListOperation

Type: ENUM Render batch callback states

Members

RenderListSubmit

Type: FUNCTION Adds a render object to the current render frame

Parameters

RenderListVisibilityFn

Type: TYPEDEF Render visibility function callback.

Parameters

RenderListVisibilityParams

Type: STRUCT Visibility dispatch function callback.

Members

RenderObject

Type: STRUCT Render objects represent an actual draw call

Members

RenderOrder

Type: ENUM Render order

Members

Result

Type: ENUM

Members

SetConstantLocation

Type: FUNCTION Sets the shader program constant location

Parameters

SetConstantType

Type: FUNCTION Sets the type of the constant

Parameters

SetConstantValues

Type: FUNCTION Sets the shader program constant values

Parameters

Returns

SetMaterialSampler

Type: FUNCTION

Parameters

Returns

SetMaterialTags

Type: FUNCTION

Parameters

SetNamedConstant

Type: FUNCTION Sets one or more named constants to the buffer

Parameters

SetNamedConstant

Type: FUNCTION Sets one or more named constants to the buffer with a specified data type. Currently only dmRenderDDF::MaterialDesc::CONSTANT_TYPE_USER and dmRenderDDF::MaterialDesc::CONSTANT_TYPE_USER_MATRIX4 are supported.

Parameters

SetNamedConstantAtIndex

Type: FUNCTION Sets a named constant in the buffer at a specific index

Parameters

Returns

SetNamedConstants

Type: FUNCTION Sets a list of named constants to the buffer

Parameters

StencilTestParams

Type: STRUCT Struct holding stencil operation setup

Members

Visibility

Type: ENUM Visibility status

Members