Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_layer_base.h File Reference

Private layer data. More...

Data Structures

struct  KzuLayerQuadParameters
 Layer quad rendering data. More...
 
struct  KzuLayerBackgroundQuadParameters
 Background quad data. More...
 
struct  KzuLayerClippingParameters
 Clipping information carried from parents. More...
 
struct  KzuLayerLayoutingParameters
 Layer layouting information separated onto a structure of its own. More...
 
struct  KzuLayerRenderingParameters
 Layer rendering information separated onto a structure of its own. More...
 
struct  KzuLayer
 Layer object. More...
 
struct  KzuLayerClass
 Layer class. More...
 

Macros

#define KZU_LAYER_RENDER_TARGET_FINAL
 Index of final render target among layer render targets. More...
 
#define KZU_LAYER_RENDER_TARGET_CACHE_SELF
 Index of cache self render target among layer render targets. More...
 
#define KZU_LAYER_RENDER_TARGET_CACHE_CHILDREN
 Index of cache children render target among layer render targets. More...
 
#define KZU_LAYER_CLIPPING_RESULT_CENTER
 Layer rendering mask - center area. More...
 
#define KZU_LAYER_CLIPPING_RESULT_BOTTOM
 Layer rendering mask - bottom part. More...
 
#define KZU_LAYER_CLIPPING_RESULT_LEFT
 Layer rendering mask - left part. More...
 
#define KZU_LAYER_CLIPPING_RESULT_RIGHT
 Layer rendering mask - right part. More...
 
#define KZU_LAYER_CLIPPING_RESULT_TOP
 Layer rendering mask - top part. More...
 
#define KZU_LAYER_CLIPPING_RESULT_OUTSIDE
 Layer clipping result - outside areas. More...
 

Typedefs

typedef kzsError(* KzuLayerOcclusionMaskFunction )(const struct KzuLayer *sourceLayer, struct KzuLayer *maskLayer, struct KzuRenderer *renderer, struct KzuRenderContextStack *renderContextStack)
 Function pointer for specifying layer occlusion mask rendering for intersecting background layer. More...
 
typedef kzsError(* KzuLayerClassHitTestContentsFunction )(const struct KzuLayer *layer, const struct KzcVector2 *point, struct KzuObjectNode **out_objectNode, struct KzcRay *out_ray, kzFloat *out_distance)
 Function type to internal hit test function. More...
 
typedef kzsError(* KzuLayerClassRenderFunction )(struct KzuLayer *layer, struct KzuRenderer *renderer, struct KzuRenderContextStack *renderContextStack, struct KzuMaterial **out_material)
 Function type to render a layer. More...
 
typedef kzsError(* KzuLayerClassMeasureFunction )(struct KzuLayer *layer, const struct KzcVector2 *availableSize, struct KzcVector2 *out_measuredSize)
 Function type of layer measure function. More...
 
typedef kzsError(* KzuLayerClassArrangeFunction )(struct KzuLayer *layer)
 Function type of layer arrange function. More...
 
typedef kzsError(* KzuLayerClassExtractFunction )(const struct KzuLayer *layer)
 Function type of layer extract function. More...
 

Enumerations

enum  KzuLayerRenderType { KZU_LAYER_RENDER_TYPE_PROVIDE_NONE, KZU_LAYER_RENDER_TYPE_PROVIDE_TEXTURE, KZU_LAYER_RENDER_TYPE_PROVIDE_VIEWPORT, KZU_LAYER_RENDER_TYPE_PROVIDE_CUSTOM }
 Layer rendering type. More...
 
enum  KzuLayerRenderingRestrictions { KZU_LAYER_RENDERING_RESTRICTIONS_NONE, KZU_LAYER_RENDERING_RESTRICTIONS_ONLY_RENDER_CONTENT, KZU_LAYER_RENDERING_RESTRICTIONS_ONLY_BLIT_CONTENT }
 Layer rendering restrictions. More...
 
enum  KzuLayerRenderTargetOverride { KZU_LAYER_RENDER_TARGET_OVERRIDE_NONE, KZU_LAYER_RENDER_TARGET_OVERRIDE_FORCE, KZU_LAYER_RENDER_TARGET_OVERRIDE_DENY, KZU_LAYER_RENDER_TARGET_OVERRIDE_COUNT }
 Layer render target override. More...
 

Functions

KZ_INLINE kzBool KzuLayerClippingParametersIsEqual (const struct KzuLayerClippingParameters *a, const struct KzuLayerClippingParameters *b)
 Checks if the two given clipping parameters match. More...
 
kzsError kzuLayerCreate_protected (const struct KzcMemoryManager *memoryManager, kzString name, struct KzuUIDomain *uiDomain, const struct KzuLayerClass *layerClass, struct KzuLayer *layer)
 Initializes default layer data. More...
 
kzsError kzuLayerInitialize_protected (struct KzuObjectNode *objectNode)
 Default initialize implementation. More...
 
kzsError kzuLayerUninitialize_protected (struct KzuObjectNode *objectNode)
 Default uninitialize implementation. More...
 
kzsError kzuLayerOnAttached_protected (struct KzuObjectNode *objectNode)
 Called when a layer becomes attached. More...
 
kzsError kzuLayerOnDetached_protected (struct KzuObjectNode *objectNode)
 Called when a layer becomes detached. More...
 
kzsError kzuLayerOnPropertyChanged_protected (struct KzuObjectNode *objectNode, const struct KzuPropertyType *propertyType, enum KzuPropertyNotificationReason reason)
 Implementation of layer property change callback. More...
 
kzsError kzuLayerCopy_protected (const struct KzuObjectNode *sourceObjectNode, struct KzuObjectNode *targetObjectNode)
 Implementation of layer copying for object node class. More...
 
kzsError kzuLayerLoadFromKZB_protected (struct KzuObjectNode *objectNode, struct KzcInputStream *inputStream, const struct KzuBinaryFileInfo *file)
 Loads layer from binary. More...
 
void kzuLayerPropagateOpacity_private (struct KzuLayer *layer)
 Propagate opacity to child layers. More...
 
kzBool kzuLayerGetUserAspectRatio_protected (const struct KzuLayer *layer, kzFloat *out_aspectRatio)
 Get aspect ratio property assigned to the layer. More...
 
kzBool kzuLayerGetUserHeight_protected (const struct KzuLayer *layer, kzFloat *out_height)
 Get layout height property assigned to the layer. More...
 
kzBool kzuLayerGetUserWidth_protected (const struct KzuLayer *layer, kzFloat *out_width)
 Get layout width property assigned to the layer. More...
 
struct KzuMaterialkzuLayerGetMaterialSafe_protected (const struct KzuLayer *layer, const struct KzuRenderer *renderer, kzBool requiresAdditionalBlending)
 Get material from layer with fallback to default. More...
 
struct KzuMaterialkzuLayerGetBackgroundMaterialSafe_protected (const struct KzuLayer *layer, const struct KzuRenderer *renderer, kzBool requiresAdditionalOpacity)
 Get backgroun material from layer with fallback to default. More...
 
struct KzuMaterialkzuLayerGetCompositionMaterialSafe_protected (const struct KzuLayer *layer, const struct KzuRenderer *renderer, kzBool requiresAdditionalBlending)
 Get composition material from layer with fallback to default. More...
 
kzsError kzuLayerSetCompositionTexture_protected (struct KzuLayer *layer, struct KzuRenderTargetTexture *renderTargetTexture)
 Set layer composition texture. More...
 
kzsError kzuLayerGetRenderTarget_protected (struct KzuLayer *layer, kzBool forceAlpha, struct KzuRenderTargetTexture **inout_renderTargetTexture)
 Get framebuffer texture. More...
 
kzsError kzuLayerGetRenderTargetChildren_protected (struct KzuLayer *layer, struct KzuRenderTargetTexture **out_renderTargetTexture)
 Get cache render target for layer's children. More...
 
kzsError kzuLayerGetRenderTargetFinal_protected (struct KzuLayer *layer, struct KzuRenderTargetTexture **out_renderTargetTexture)
 Get a combined, single render target the layer should output. More...
 
kzsError kzuLayerGetRenderTargetSelf_protected (struct KzuLayer *layer, struct KzuRenderTargetTexture **out_renderTargetTexture)
 Get cache render target for layer itself. More...
 
kzsError kzuLayerSetUserRenderTarget_protected (struct KzuLayer *layer, struct KzuRenderTargetTexture *layerRenderTargetTexture)
 Set layer render target to given texture, this texture is not managed by the layer itself. More...
 
kzsError kzuLayerHitTestContent_protected (const struct KzuLayer *layer, const struct KzcVector2 *point, struct KzuObjectNode **out_objectNode, struct KzcRay *out_ray, kzFloat *out_distance)
 Default implementation of layer content hit test. More...
 
kzsError kzuLayerArrange_protected (struct KzuLayer *layer)
 Default implementation of layer arrange. More...
 
void kzuLayerAssignActualSizeDefault_protected (struct KzuLayer *layer, kzFloat sizeX, kzFloat sizeY)
 Default assignment of layer actual size. More...
 
kzsError kzuLayerExtract_protected (const struct KzuLayer *layer)
 Default implementation of layer extract. More...
 
kzsError kzuLayerExtractChildren_protected (const struct KzuLayer *layer)
 Extract children of layer, called from layer extraction implementations. More...
 
kzsError kzuLayerMeasure_protected (struct KzuLayer *layer, const struct KzcVector2 *availableSize, struct KzcVector2 *out_measuredSize)
 Default implementation of layer size calculation. More...
 
kzsError kzuLayerClearRenderTarget_protected (const struct KzuLayer *layer, struct KzuRenderer *renderer, const struct KzuRenderContextStack *renderContextStack, kzBool requiresAdditionalBlending)
 Clear render context stack area (if meaningful). More...
 
kzsError kzuLayerClearRenderTargetWithProperties_protected (const struct KzuLayer *layer, struct KzuRenderer *renderer, kzBool requiresAdditionalBlending, struct KzuRenderTarget *renderTarget, const struct KzcVector2 *limits)
 Clears render target area with properties instead of context stack. More...
 
kzsError kzuLayerRender_protected (struct KzuLayer *layer, struct KzuRenderer *renderer, struct KzuRenderContextStack *renderContextStack, struct KzuMaterial **out_material)
 Default layer render implementation. More...
 
kzsError kzuLayerRenderBackgroundQuad_protected (const struct KzuLayer *layer, struct KzuRenderer *renderer, const struct KzuRenderContextStack *renderContextStack, kzBool requiresAdditionalOpacity)
 Render background quad. More...
 
kzsError kzuLayerRenderChildren_protected (struct KzuLayer *layer, struct KzuRenderer *renderer, struct KzuRenderContextStack *renderContextStack, kzBool externalRenderTarget)
 Render all children of a layer. More...
 
kzsError kzuLayerRenderQuad_protected (const struct KzuLayer *layer, struct KzuRenderer *renderer, const struct KzuRenderContextStack *renderContextStack, const struct KzuLayerQuadParameters *quad, const struct KzcMatrix3x3 *renderTransform, const struct KzuMaterial *material, kzBool isCompositionMaterial)
 Render layer quad. More...
 
kzsError kzuLayerRenderQuadWithProperties_protected (const struct KzuLayer *layer, struct KzuRenderer *renderer, const struct KzuLayerQuadParameters *quad, const struct KzcMatrix3x3 *renderTransform, const struct KzuMaterial *material, kzBool isCompositionMaterial, struct KzuRenderTarget *renderTarget, const struct KzcVector2 *limits)
 Render layer quad with properties. More...
 
kzsError kzuLayerRenderObjectNode_protected (const struct KzuObjectNode *objectNode, struct KzuRenderer *renderer, const struct KzuTransformedObjectNode *transformedObjectNode, struct KzcMatrix4x4 *worldTransformation)
 Implementation of layer rendering for object node class. More...
 
kzsError kzuLayerHandleAnimationPlayerPlayAnimation_protected (struct KzuMessage *message, void *userData)
 Handler for animation player play animation message. More...
 
void kzuLayerSetOcclusionMaskFunction_protected (struct KzuLayer *layer, KzuLayerOcclusionMaskFunction occlusionMaskFunction)
 Sets occlusion mask function for layer, if not set uses default mask generating function that is stencil quad from layer area when opaque layer. More...
 
void kzuLayerGetMaskQuadProperties_protected (const struct KzuLayer *layer, struct KzcVector2 *out_offset, struct KzcVector2 *out_size, struct KzcMatrix4x4 *out_transformation)
 Returns mask quad specific properties from the layer. More...
 
kzsError kzuLayerExtractLayerGraphBegin_protected (struct KzuLayer *layer, const struct KzuRenderContextStack *renderContextStack, struct KzuRenderTarget **out_renderTarget, struct KzcVector2 *out_limits)
 Begins extraction of layer, returns render target for which the content is generated and the size. More...
 
kzsError kzuLayerExtractLayerGraphEnd_protected (const struct KzuLayer *layer, const struct KzuRenderContextStack *renderContextStack, struct KzuRenderTarget **out_blitQuadTexture, struct KzcVector2 *out_blitQuadLimits)
 Ends extraction of layer, returns render target for which the blitting of quad is performed and the size. More...
 
kzBool kzuLayerCanBeInvalidated_private (const struct KzuLayer *layer)
 Returns if layer can be invalidated when rendering individually. More...
 
kzsError kzuLayerMeasureSingle_protected (struct KzuLayer *layer, const struct KzcVector2 *availableSize, kzBool handleStretch, kzBool *out_propagateMeasure)
 Measure one layer. More...
 

Variables

struct KzuObjectNodeClass KZU_LAYER_CLASS
 Layer node's object node class. More...
 

Detailed Description

Private layer data.

Copyright 2008-2019 by Rightware. All rights reserved.

Macro Definition Documentation

#define KZU_LAYER_RENDER_TARGET_FINAL

Index of final render target among layer render targets.

#define KZU_LAYER_RENDER_TARGET_CACHE_SELF

Index of cache self render target among layer render targets.

#define KZU_LAYER_RENDER_TARGET_CACHE_CHILDREN

Index of cache children render target among layer render targets.

#define KZU_LAYER_CLIPPING_RESULT_CENTER

Layer rendering mask - center area.

#define KZU_LAYER_CLIPPING_RESULT_BOTTOM

Layer rendering mask - bottom part.

#define KZU_LAYER_CLIPPING_RESULT_LEFT

Layer rendering mask - left part.

#define KZU_LAYER_CLIPPING_RESULT_RIGHT

Layer rendering mask - right part.

#define KZU_LAYER_CLIPPING_RESULT_TOP

Layer rendering mask - top part.

#define KZU_LAYER_CLIPPING_RESULT_OUTSIDE

Layer clipping result - outside areas.

Typedef Documentation

typedef kzsError(* KzuLayerOcclusionMaskFunction)(const struct KzuLayer *sourceLayer, struct KzuLayer *maskLayer, struct KzuRenderer *renderer, struct KzuRenderContextStack *renderContextStack)

Function pointer for specifying layer occlusion mask rendering for intersecting background layer.

typedef kzsError(* KzuLayerClassHitTestContentsFunction)(const struct KzuLayer *layer, const struct KzcVector2 *point, struct KzuObjectNode **out_objectNode, struct KzcRay *out_ray, kzFloat *out_distance)

Function type to internal hit test function.

Given point is in the layer space.

typedef kzsError(* KzuLayerClassRenderFunction)(struct KzuLayer *layer, struct KzuRenderer *renderer, struct KzuRenderContextStack *renderContextStack, struct KzuMaterial **out_material)

Function type to render a layer.

typedef kzsError(* KzuLayerClassMeasureFunction)(struct KzuLayer *layer, const struct KzcVector2 *availableSize, struct KzcVector2 *out_measuredSize)

Function type of layer measure function.

typedef kzsError(* KzuLayerClassArrangeFunction)(struct KzuLayer *layer)

Function type of layer arrange function.

typedef kzsError(* KzuLayerClassExtractFunction)(const struct KzuLayer *layer)

Function type of layer extract function.

Enumeration Type Documentation

Layer rendering type.

Enumerator
KZU_LAYER_RENDER_TYPE_PROVIDE_NONE 

Will not render itself except for its children.

KZU_LAYER_RENDER_TYPE_PROVIDE_TEXTURE 

Layer will provide texture(d material).

KZU_LAYER_RENDER_TYPE_PROVIDE_VIEWPORT 

Render a viewport - rotation forces composing.

KZU_LAYER_RENDER_TYPE_PROVIDE_CUSTOM 

Provide custom rendering but not a viewport.

Layer rendering restrictions.

Enumerator
KZU_LAYER_RENDERING_RESTRICTIONS_NONE 
KZU_LAYER_RENDERING_RESTRICTIONS_ONLY_RENDER_CONTENT 
KZU_LAYER_RENDERING_RESTRICTIONS_ONLY_BLIT_CONTENT 

Layer render target override.

Enumerator
KZU_LAYER_RENDER_TARGET_OVERRIDE_NONE 

Let layer decide whether to render to render target (default).

KZU_LAYER_RENDER_TARGET_OVERRIDE_FORCE 

Force render to render target.

KZU_LAYER_RENDER_TARGET_OVERRIDE_DENY 

Deny render to render target.

KZU_LAYER_RENDER_TARGET_OVERRIDE_COUNT 

Last enum value for validity checks.

Function Documentation

KZ_INLINE kzBool KzuLayerClippingParametersIsEqual ( const struct KzuLayerClippingParameters a,
const struct KzuLayerClippingParameters b 
)

Checks if the two given clipping parameters match.

kzsError kzuLayerCreate_protected ( const struct KzcMemoryManager memoryManager,
kzString  name,
struct KzuUIDomain uiDomain,
const struct KzuLayerClass layerClass,
struct KzuLayer layer 
)

Initializes default layer data.

Performs the actual object node creation.

kzsError kzuLayerInitialize_protected ( struct KzuObjectNode objectNode)

Default initialize implementation.

kzsError kzuLayerUninitialize_protected ( struct KzuObjectNode objectNode)

Default uninitialize implementation.

kzsError kzuLayerOnAttached_protected ( struct KzuObjectNode objectNode)

Called when a layer becomes attached.

kzsError kzuLayerOnDetached_protected ( struct KzuObjectNode objectNode)

Called when a layer becomes detached.

kzsError kzuLayerOnPropertyChanged_protected ( struct KzuObjectNode objectNode,
const struct KzuPropertyType propertyType,
enum KzuPropertyNotificationReason  reason 
)

Implementation of layer property change callback.

kzsError kzuLayerCopy_protected ( const struct KzuObjectNode sourceObjectNode,
struct KzuObjectNode targetObjectNode 
)

Implementation of layer copying for object node class.

kzsError kzuLayerLoadFromKZB_protected ( struct KzuObjectNode objectNode,
struct KzcInputStream inputStream,
const struct KzuBinaryFileInfo file 
)

Loads layer from binary.

void kzuLayerPropagateOpacity_private ( struct KzuLayer layer)

Propagate opacity to child layers.

Should be called in the arrange phase of layers that wish to propagate their opacity to their children. This should be an alternative to being composited.

kzBool kzuLayerGetUserAspectRatio_protected ( const struct KzuLayer layer,
kzFloat out_aspectRatio 
)

Get aspect ratio property assigned to the layer.

Aspect ratio of 0 or smaller equals no aspect ratio set.

kzBool kzuLayerGetUserHeight_protected ( const struct KzuLayer layer,
kzFloat out_height 
)

Get layout height property assigned to the layer.

Having an offscreen render target overrides the layer's default size.

Returns
True if property was set.
kzBool kzuLayerGetUserWidth_protected ( const struct KzuLayer layer,
kzFloat out_width 
)

Get layout width property assigned to the layer.

Having an offscreen render target overrides the layer's default size.

Returns
True if property was set.
struct KzuMaterial* kzuLayerGetMaterialSafe_protected ( const struct KzuLayer layer,
const struct KzuRenderer renderer,
kzBool  requiresAdditionalBlending 
)

Get material from layer with fallback to default.

Revert to 'safe' default material from renderer if no specific material set.

struct KzuMaterial* kzuLayerGetBackgroundMaterialSafe_protected ( const struct KzuLayer layer,
const struct KzuRenderer renderer,
kzBool  requiresAdditionalOpacity 
)

Get backgroun material from layer with fallback to default.

Revert to 'safe' default material from renderer if no specific material set.

struct KzuMaterial* kzuLayerGetCompositionMaterialSafe_protected ( const struct KzuLayer layer,
const struct KzuRenderer renderer,
kzBool  requiresAdditionalBlending 
)

Get composition material from layer with fallback to default.

Revert to 'safe' default material from renderer if no specific material set.

kzsError kzuLayerSetCompositionTexture_protected ( struct KzuLayer layer,
struct KzuRenderTargetTexture renderTargetTexture 
)

Set layer composition texture.

Avoids potentially expensive property set if the value would not change. Sets composition texture size for cases where render area does not actually encompass whole render target.

kzsError kzuLayerGetRenderTarget_protected ( struct KzuLayer layer,
kzBool  forceAlpha,
struct KzuRenderTargetTexture **  inout_renderTargetTexture 
)

Get framebuffer texture.

The pointer to the framebuffer texture to modify is passed to the function. If the framebuffer texture does not exist or the framebuffer settings for the layer have been changed, it is (re)created. Recreating the texture may invalidate the former reference to the texture, it's safer to call this function before accessing the framebuffer than storing the value.

kzsError kzuLayerGetRenderTargetChildren_protected ( struct KzuLayer layer,
struct KzuRenderTargetTexture **  out_renderTargetTexture 
)

Get cache render target for layer's children.

kzsError kzuLayerGetRenderTargetFinal_protected ( struct KzuLayer layer,
struct KzuRenderTargetTexture **  out_renderTargetTexture 
)

Get a combined, single render target the layer should output.

kzsError kzuLayerGetRenderTargetSelf_protected ( struct KzuLayer layer,
struct KzuRenderTargetTexture **  out_renderTargetTexture 
)

Get cache render target for layer itself.

kzsError kzuLayerSetUserRenderTarget_protected ( struct KzuLayer layer,
struct KzuRenderTargetTexture layerRenderTargetTexture 
)

Set layer render target to given texture, this texture is not managed by the layer itself.

If layer already has a render target used for caching the final result, it is destroyed. Render targets used for caching of render self or render children are not affected. If called with KZ_NULL, do the reverse, and clear the assigned render target.

kzsError kzuLayerHitTestContent_protected ( const struct KzuLayer layer,
const struct KzcVector2 point,
struct KzuObjectNode **  out_objectNode,
struct KzcRay out_ray,
kzFloat out_distance 
)

Default implementation of layer content hit test.

Just returns the layer itself.

kzsError kzuLayerArrange_protected ( struct KzuLayer layer)

Default implementation of layer arrange.

void kzuLayerAssignActualSizeDefault_protected ( struct KzuLayer layer,
kzFloat  sizeX,
kzFloat  sizeY 
)

Default assignment of layer actual size.

Also assigns allocated sizes of children. Should be called in the arrange functions of non-layouts.

kzsError kzuLayerExtract_protected ( const struct KzuLayer layer)

Default implementation of layer extract.

kzsError kzuLayerExtractChildren_protected ( const struct KzuLayer layer)

Extract children of layer, called from layer extraction implementations.

kzsError kzuLayerMeasure_protected ( struct KzuLayer layer,
const struct KzcVector2 availableSize,
struct KzcVector2 out_measuredSize 
)

Default implementation of layer size calculation.

kzsError kzuLayerClearRenderTarget_protected ( const struct KzuLayer layer,
struct KzuRenderer renderer,
const struct KzuRenderContextStack *  renderContextStack,
kzBool  requiresAdditionalBlending 
)

Clear render context stack area (if meaningful).

kzsError kzuLayerClearRenderTargetWithProperties_protected ( const struct KzuLayer layer,
struct KzuRenderer renderer,
kzBool  requiresAdditionalBlending,
struct KzuRenderTarget renderTarget,
const struct KzcVector2 limits 
)

Clears render target area with properties instead of context stack.

kzsError kzuLayerRender_protected ( struct KzuLayer layer,
struct KzuRenderer renderer,
struct KzuRenderContextStack *  renderContextStack,
struct KzuMaterial **  out_material 
)

Default layer render implementation.

Does nothing.

kzsError kzuLayerRenderBackgroundQuad_protected ( const struct KzuLayer layer,
struct KzuRenderer renderer,
const struct KzuRenderContextStack *  renderContextStack,
kzBool  requiresAdditionalOpacity 
)

Render background quad.

kzsError kzuLayerRenderChildren_protected ( struct KzuLayer layer,
struct KzuRenderer renderer,
struct KzuRenderContextStack *  renderContextStack,
kzBool  externalRenderTarget 
)

Render all children of a layer.

kzsError kzuLayerRenderQuad_protected ( const struct KzuLayer layer,
struct KzuRenderer renderer,
const struct KzuRenderContextStack *  renderContextStack,
const struct KzuLayerQuadParameters quad,
const struct KzcMatrix3x3 renderTransform,
const struct KzuMaterial material,
kzBool  isCompositionMaterial 
)

Render layer quad.

kzsError kzuLayerRenderQuadWithProperties_protected ( const struct KzuLayer layer,
struct KzuRenderer renderer,
const struct KzuLayerQuadParameters quad,
const struct KzcMatrix3x3 renderTransform,
const struct KzuMaterial material,
kzBool  isCompositionMaterial,
struct KzuRenderTarget renderTarget,
const struct KzcVector2 limits 
)

Render layer quad with properties.

kzsError kzuLayerRenderObjectNode_protected ( const struct KzuObjectNode objectNode,
struct KzuRenderer renderer,
const struct KzuTransformedObjectNode transformedObjectNode,
struct KzcMatrix4x4 worldTransformation 
)

Implementation of layer rendering for object node class.

Returns an error.

kzsError kzuLayerHandleAnimationPlayerPlayAnimation_protected ( struct KzuMessage message,
void userData 
)

Handler for animation player play animation message.

void kzuLayerSetOcclusionMaskFunction_protected ( struct KzuLayer layer,
KzuLayerOcclusionMaskFunction  occlusionMaskFunction 
)

Sets occlusion mask function for layer, if not set uses default mask generating function that is stencil quad from layer area when opaque layer.

void kzuLayerGetMaskQuadProperties_protected ( const struct KzuLayer layer,
struct KzcVector2 out_offset,
struct KzcVector2 out_size,
struct KzcMatrix4x4 out_transformation 
)

Returns mask quad specific properties from the layer.

kzsError kzuLayerExtractLayerGraphBegin_protected ( struct KzuLayer layer,
const struct KzuRenderContextStack *  renderContextStack,
struct KzuRenderTarget **  out_renderTarget,
struct KzcVector2 out_limits 
)

Begins extraction of layer, returns render target for which the content is generated and the size.

kzsError kzuLayerExtractLayerGraphEnd_protected ( const struct KzuLayer layer,
const struct KzuRenderContextStack *  renderContextStack,
struct KzuRenderTarget **  out_blitQuadTexture,
struct KzcVector2 out_blitQuadLimits 
)

Ends extraction of layer, returns render target for which the blitting of quad is performed and the size.

kzBool kzuLayerCanBeInvalidated_private ( const struct KzuLayer layer)

Returns if layer can be invalidated when rendering individually.

kzsError kzuLayerMeasureSingle_protected ( struct KzuLayer layer,
const struct KzcVector2 availableSize,
kzBool  handleStretch,
kzBool out_propagateMeasure 
)

Measure one layer.

Variable Documentation

struct KzuObjectNodeClass KZU_LAYER_CLASS

Layer node's object node class.