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

Specifies a render pass structure. More...

Macros

#define KZU_RENDER_PASS_DEFAULT_DEPTH_CLEAR_VALUE
 Default value for renderpass depth clear. More...
 

Functions

kzsError kzuRenderPassRegisterToFactory (const struct KzuFactory *factory)
 Registers render pass to the factory. More...
 
kzsError kzuRenderPassCreate (const struct KzcMemoryManager *memoryManager, kzString name, struct KzuUIDomain *uiDomain, struct KzuRenderPass **out_renderPass)
 Creates a render pass. More...
 
void kzuComposerRequiresDepthBuffer (const struct KzuComposer *composer, kzBool *out_allowDepthClear, kzBool *out_requiresDepth)
 Check if a composer (by the requirement of render passes) requires a depth buffer to render correctly. More...
 
kzsError kzuRenderPassSetObjectSource (struct KzuRenderPass *renderPass, struct KzuObjectSource *objectSource)
 Sets an object source for render pass. More...
 
struct KzuObjectSourcekzuRenderPassGetObjectSource (const struct KzuRenderPass *renderPass)
 Gets object source from render pass. More...
 
kzsError kzuRenderPassSetColorBuffer (const struct KzuRenderPass *renderPass, kzBool clearEnabled, struct KzcColorRGBA clearColor, enum KzuColorWriteMode writeMode)
 Sets a color buffer for render pass. More...
 
kzsError kzuRenderPassSetColorBufferClearEnabled (const struct KzuRenderPass *renderPass, kzBool enabled)
 Sets color buffer clear enabled for render pass. More...
 
struct KzcColorRGBA kzuRenderPassGetClearColor (const struct KzuRenderPass *renderPass)
 Returns the current clear color. More...
 
enum KzuColorWriteMode kzuRenderPassGetColorWriteMode (const struct KzuRenderPass *renderPass)
 Returns the current clear color. More...
 
kzBool kzuRenderPassGetColorClearEnabled (const struct KzuRenderPass *renderPass)
 Returns KZ_TRUE if color buffer clear is enabled. More...
 
kzsError kzuRenderPassSetDepthBuffer (const struct KzuRenderPass *renderPass, kzBool depthClearEnabled, kzFloat clearValue, kzBool depthTestEnabled, kzBool depthWriteEnabled)
 Sets a depth buffer for render pass. More...
 
kzsError kzuRenderPassSetStencilBuffer (const struct KzuRenderPass *renderPass, kzBool stencilClearEnabled, kzInt clearValue, kzBool stencilTestEnabled, enum KzuStencilOperation stencilModeSfail, enum KzuStencilOperation stencilModeDPfail, enum KzuStencilOperation stencilModeDPpass, enum KzuStencilFunction stencilFunction)
 Sets a stencil buffer for render pass. More...
 
kzsError kzuRenderPassSetCullMode (const struct KzuRenderPass *renderPass, enum KzuCullMode mode)
 Sets a cull mode for render pass. More...
 
void kzuRenderPassSetViewportAbsolute (struct KzuRenderPass *renderPass, kzUint x, kzUint y, kzUint width, kzUint height)
 Sets the view port's size in absolute coordinates (pixels) More...
 
void kzuRenderPassSetViewportRelative (struct KzuRenderPass *renderPass, kzFloat x, kzFloat y, kzFloat width, kzFloat height)
 Sets the view port's size in coordinates relative to screen size (0.f = left, 1.f = right) (0.f = top, 1.f = bottom) More...
 
void kzuRenderPassSetRenderOnce (struct KzuRenderPass *renderPass, kzBool renderOnce)
 Sets render pass to state where it gets rendered once and is disabled after that. More...
 
kzsError kzuRenderPassSetCamera (const struct KzuRenderPass *renderPass, struct KzuCameraNode *cameraNode)
 Sets camera for render pass. More...
 
kzsError kzuRenderPassSetFrustumCulling (const struct KzuRenderPass *renderPass, kzBool enabled)
 Sets frustum culling enabled / disabled. More...
 
kzsError kzuRenderPassSetStencilTestEnabled (const struct KzuRenderPass *renderPass, kzBool enabled)
 Sets stencil test enabled for render pass. More...
 
kzsError kzuRenderPassSetStencilFailOperation (const struct KzuRenderPass *renderPass, enum KzuStencilOperation stencilOp)
 Sets stencil fail operation for render pass. More...
 
kzsError kzuRenderPassSetStencilPassDepthFailOperation (const struct KzuRenderPass *renderPass, enum KzuStencilOperation stencilOp)
 Sets stencil pass depth fail operation for render pass. More...
 
kzsError kzuRenderPassSetStencilPassDepthPassOperation (const struct KzuRenderPass *renderPass, enum KzuStencilOperation stencilOp)
 Sets stencil pass depth pass operation for render pass. More...
 
kzsError kzuRenderPassSetStencilReferenceValue (const struct KzuRenderPass *renderPass, kzInt stencilValue)
 Sets stencil reference value for render pass. More...
 
kzsError kzuRenderPassSetStencilMaskValue (const struct KzuRenderPass *renderPass, kzInt maskValue)
 Sets stencil reference value for render pass. More...
 
kzBool kzuRenderPassIsStencilTestEnabled (const struct KzuRenderPass *renderPass)
 Returns if stencil test is enabled for render pass. More...
 
enum KzuStencilOperation kzuRenderPassGetStencilFailOperation (const struct KzuRenderPass *renderPass)
 Returns stencil fail operation from render pass. More...
 
enum KzuStencilOperation kzuRenderPassGetStencilPassDepthFailOperation (const struct KzuRenderPass *renderPass)
 Returns stencil pass depth fail operation from render pass. More...
 
enum KzuStencilOperation kzuRenderPassGetStencilPassDepthPassOperation (const struct KzuRenderPass *renderPass)
 Returns stencil pass depth pass operation from render pass. More...
 
kzInt kzuRenderPassGetStencilReferenceValue (const struct KzuRenderPass *renderPass)
 Gets stencil reference value from render pass. More...
 
kzInt kzuRenderPassGetStencilMaskValue (const struct KzuRenderPass *renderPass)
 Gets stencil mask value from render pass. More...
 
struct KzuComposerkzuRenderPassToComposer (const struct KzuRenderPass *renderPass)
 Casts render pass to composer. More...
 
struct KzuRenderPasskzuRenderPassFromComposer (const struct KzuComposer *composer)
 Casts composer to render pass. More...
 

Variables

KZ_HEADER_BEGIN const
KzuResourceType 
KZU_COMPOSER_TYPE_RENDER_PASS
 Composer type identifier for render pass. More...
 

Detailed Description

Specifies a render pass structure.

Render pass specifies one stage of rendering with specified characteristics, defined by render pass properties (and filter). Sets of render passes are piped via composer.

Copyright 2008-2019 by Rightware. All rights reserved.

Macro Definition Documentation

#define KZU_RENDER_PASS_DEFAULT_DEPTH_CLEAR_VALUE

Default value for renderpass depth clear.

Function Documentation

kzsError kzuRenderPassRegisterToFactory ( const struct KzuFactory factory)

Registers render pass to the factory.

kzsError kzuRenderPassCreate ( const struct KzcMemoryManager memoryManager,
kzString  name,
struct KzuUIDomain uiDomain,
struct KzuRenderPass **  out_renderPass 
)

Creates a render pass.

void kzuComposerRequiresDepthBuffer ( const struct KzuComposer composer,
kzBool out_allowDepthClear,
kzBool out_requiresDepth 
)

Check if a composer (by the requirement of render passes) requires a depth buffer to render correctly.

kzsError kzuRenderPassSetObjectSource ( struct KzuRenderPass renderPass,
struct KzuObjectSource objectSource 
)

Sets an object source for render pass.

struct KzuObjectSource* kzuRenderPassGetObjectSource ( const struct KzuRenderPass renderPass)

Gets object source from render pass.

kzsError kzuRenderPassSetColorBuffer ( const struct KzuRenderPass renderPass,
kzBool  clearEnabled,
struct KzcColorRGBA  clearColor,
enum KzuColorWriteMode  writeMode 
)

Sets a color buffer for render pass.

kzsError kzuRenderPassSetColorBufferClearEnabled ( const struct KzuRenderPass renderPass,
kzBool  enabled 
)

Sets color buffer clear enabled for render pass.

struct KzcColorRGBA kzuRenderPassGetClearColor ( const struct KzuRenderPass renderPass)

Returns the current clear color.

enum KzuColorWriteMode kzuRenderPassGetColorWriteMode ( const struct KzuRenderPass renderPass)

Returns the current clear color.

kzBool kzuRenderPassGetColorClearEnabled ( const struct KzuRenderPass renderPass)

Returns KZ_TRUE if color buffer clear is enabled.

kzsError kzuRenderPassSetDepthBuffer ( const struct KzuRenderPass renderPass,
kzBool  depthClearEnabled,
kzFloat  clearValue,
kzBool  depthTestEnabled,
kzBool  depthWriteEnabled 
)

Sets a depth buffer for render pass.

Parameters
renderPassrenderPass to be applied.
depthClearEnabledIs depth buffer cleared on beginning of this renderpass.
clearValueclearValue clear value used if clearing enabled, use KZU_RENDER_PASS_DEFAULT_DEPTH_CLEAR_VALUE by default.
depthTestEnabledDepth testing enabled / disabled.
depthWriteEnabledWriting to depth buffer enabled / disabled.
kzsError kzuRenderPassSetStencilBuffer ( const struct KzuRenderPass renderPass,
kzBool  stencilClearEnabled,
kzInt  clearValue,
kzBool  stencilTestEnabled,
enum KzuStencilOperation  stencilModeSfail,
enum KzuStencilOperation  stencilModeDPfail,
enum KzuStencilOperation  stencilModeDPpass,
enum KzuStencilFunction  stencilFunction 
)

Sets a stencil buffer for render pass.

kzsError kzuRenderPassSetCullMode ( const struct KzuRenderPass renderPass,
enum KzuCullMode  mode 
)

Sets a cull mode for render pass.

void kzuRenderPassSetViewportAbsolute ( struct KzuRenderPass renderPass,
kzUint  x,
kzUint  y,
kzUint  width,
kzUint  height 
)

Sets the view port's size in absolute coordinates (pixels)

void kzuRenderPassSetViewportRelative ( struct KzuRenderPass renderPass,
kzFloat  x,
kzFloat  y,
kzFloat  width,
kzFloat  height 
)

Sets the view port's size in coordinates relative to screen size (0.f = left, 1.f = right) (0.f = top, 1.f = bottom)

void kzuRenderPassSetRenderOnce ( struct KzuRenderPass renderPass,
kzBool  renderOnce 
)

Sets render pass to state where it gets rendered once and is disabled after that.

kzsError kzuRenderPassSetCamera ( const struct KzuRenderPass renderPass,
struct KzuCameraNode cameraNode 
)

Sets camera for render pass.

kzsError kzuRenderPassSetFrustumCulling ( const struct KzuRenderPass renderPass,
kzBool  enabled 
)

Sets frustum culling enabled / disabled.

kzsError kzuRenderPassSetStencilTestEnabled ( const struct KzuRenderPass renderPass,
kzBool  enabled 
)

Sets stencil test enabled for render pass.

kzsError kzuRenderPassSetStencilFailOperation ( const struct KzuRenderPass renderPass,
enum KzuStencilOperation  stencilOp 
)

Sets stencil fail operation for render pass.

kzsError kzuRenderPassSetStencilPassDepthFailOperation ( const struct KzuRenderPass renderPass,
enum KzuStencilOperation  stencilOp 
)

Sets stencil pass depth fail operation for render pass.

kzsError kzuRenderPassSetStencilPassDepthPassOperation ( const struct KzuRenderPass renderPass,
enum KzuStencilOperation  stencilOp 
)

Sets stencil pass depth pass operation for render pass.

kzsError kzuRenderPassSetStencilReferenceValue ( const struct KzuRenderPass renderPass,
kzInt  stencilValue 
)

Sets stencil reference value for render pass.

kzsError kzuRenderPassSetStencilMaskValue ( const struct KzuRenderPass renderPass,
kzInt  maskValue 
)

Sets stencil reference value for render pass.

kzBool kzuRenderPassIsStencilTestEnabled ( const struct KzuRenderPass renderPass)

Returns if stencil test is enabled for render pass.

enum KzuStencilOperation kzuRenderPassGetStencilFailOperation ( const struct KzuRenderPass renderPass)

Returns stencil fail operation from render pass.

enum KzuStencilOperation kzuRenderPassGetStencilPassDepthFailOperation ( const struct KzuRenderPass renderPass)

Returns stencil pass depth fail operation from render pass.

enum KzuStencilOperation kzuRenderPassGetStencilPassDepthPassOperation ( const struct KzuRenderPass renderPass)

Returns stencil pass depth pass operation from render pass.

kzInt kzuRenderPassGetStencilReferenceValue ( const struct KzuRenderPass renderPass)

Gets stencil reference value from render pass.

kzInt kzuRenderPassGetStencilMaskValue ( const struct KzuRenderPass renderPass)

Gets stencil mask value from render pass.

struct KzuComposer* kzuRenderPassToComposer ( const struct KzuRenderPass renderPass)

Casts render pass to composer.

struct KzuRenderPass* kzuRenderPassFromComposer ( const struct KzuComposer composer)

Casts composer to render pass.

Variable Documentation

KZ_HEADER_BEGIN const KzuResourceType KZU_COMPOSER_TYPE_RENDER_PASS

Composer type identifier for render pass.