Render pass passes set of objects to be rendered down to renderer. More...
#include <kanzi/graphics_3d/renderpass.hpp>
Public Member Functions | |
Renderpass (Domain *domain, string_view name="") | |
void | applyBufferSettingsAndCulling (const Renderer3D *userRenderer) const |
void | setObjectSource (ObjectSourceSharedPtr objectSource) |
Sets an object source for render pass. More... | |
KzuObjectSource * | getObjectSource () const |
Gets object source from render pass. More... | |
void | setColorBuffer (bool clearEnabled, ColorRGBA clearColor, GraphicsColorWriteMode writeMode) |
Sets a color buffer for render pass. More... | |
void | setDepthBuffer (bool depthClearEnabled, float clearValue, bool depthTestEnabled, bool depthWriteEnabled) |
Sets a depth buffer for render pass. More... | |
void | setStencilBuffer (bool stencilClearEnabled, unsigned int clearValue, bool stencilTestEnabled, GraphicsStencilOperation stencilModeSfail, GraphicsStencilOperation stencilModeDPfail, GraphicsStencilOperation stencilModeDPpass, GraphicsCompareFunction stencilFunction) |
Sets a stencil buffer for render pass. More... | |
void | setViewportAbsolute (unsigned int x, unsigned int y, unsigned int width, unsigned int height) |
Sets the view port's size in absolute coordinates (pixels) More... | |
void | setViewportRelative (float x, float y, float width, float 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 | setRenderOnce (bool renderOnce) |
Sets render pass to state where it gets rendered once and is disabled after that. More... | |
void | iterateTransformedObjects (Renderer3D *renderer, const KzcDynamicArray *transformedObjects, Renderer3D::ApplyObjectFunction applyFunction) |
virtual void | loadFromKZB (const KzuResourceLoaderThreadContext *threadContext, KzcInputStream *inputStream, const KzuBinaryFileInfo *file) KZ_OVERRIDE |
Function for loading the resource from .KZB. More... | |
virtual void | applyOverride (Renderer3D *renderer, const TransformedScene3D *transformedScene, RenderContextStack &renderContextStack) KZ_OVERRIDE |
virtual void | requiresDepthBuffer (bool &out_allowDepthClear, bool &out_requiresDepth) const KZ_OVERRIDE |
virtual void | initialize () KZ_OVERRIDE |
![]() | |
Composer (Domain *domain, string_view name="") | |
virtual void | reset () |
void | apply (Renderer3D *renderer, const TransformedScene3D *transformedScene, RenderContextStack &renderContextStack) |
void | setRenderTarget (FramebufferSharedPtr renderTarget) |
FramebufferSharedPtr | getRenderTarget () const |
ComposerContainer::const_iterator | beginChildren () const |
ComposerContainer::const_iterator | endChildren () const |
void | addChild (ComposerSharedPtr childComposer) |
Adds a child to composer. More... | |
void | addChildAtIndex (size_t index, ComposerSharedPtr childComposer) |
Add child composer at given index in parent. More... | |
void | removeChild (ComposerSharedPtr childComposer) |
Removes a child from composer. More... | |
void | removeAllChildren () |
Removes all m_children from composer. More... | |
ComposerSharedPtr | getChildComposer (size_t index) |
Gets a child composer from composer at given index. If index is out of range 0 is returned. More... | |
size_t | getChildCount () const |
Returns the amount of render passes in composer. More... | |
![]() | |
KzcMemoryManager * | getMemoryManager () const |
Resource (Domain *domain, string_view name) | |
virtual | ~Resource () |
virtual void | finishLoadingOverride (const KzuResourceLoaderThreadContext *threadContext) |
Function for finishing the loading of the resource. More... | |
virtual void | unloadOverride () |
Unload function for resource. More... | |
virtual kzUint | getCPUMemoryUsage () const |
Function for getting the memory usage of a resource. More... | |
void | setKZB (const KzuBinaryDirectory *binaryDirectory, kzString path) |
void | setLoaded () |
kzString | getName () const |
Accessor. More... | |
void | load () |
void | unload () |
bool | isLoaded () const |
void | kzuResourceLoad_private (const KzuResourceLoaderThreadContext *threadContext) |
Private function for kzuResourceLoad() with specified thread context. More... | |
void | kzuResourceFinishLoading_private (const KzuResourceLoaderThreadContext *threadContext) |
Private function for finishing the loading of the resource. More... | |
KzuResourceLoadingStrategy | getLoadingStrategy () const |
void | setLoadingStrategy (KzuResourceLoadingStrategy loadingStrategy) |
bool | getKeepAlive () const |
Tells if the resource has keep alive flag set. More... | |
void | setKeepAlive (bool keepAlive) |
Sets the keep alive flag. More... | |
![]() | |
Object (Domain *domain) | |
virtual | ~Object () |
Domain * | getDomain () const |
Returns the domain the object belongs to. More... | |
KzuPropertyManager * | getPropertyManager () const |
Returns the property manager of the object. More... | |
KzuTaskScheduler * | getTaskScheduler () const |
Returns the task scheduler of the object. More... | |
KzuMessageDispatcher * | getMessageDispatcher () const |
Returns the message dispatcher of the object. More... | |
ResourceManager * | getResourceManager () const |
Returns the resource manager of the object. More... | |
virtual const Metaclass * | getDynamicMetaclass () const |
Returns the metaclass of the dynamic type of the object. More... | |
bool | isTypeOf (const Metaclass *objectType) const |
Determines if the type of this object is the given type or derived from it. More... | |
template<typename DataType > | |
void | setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::DataType value) |
Sets the local value of a property. More... | |
void | setProperty (const PropertyType< ResourceID > &propertyType, ResourceSharedPtr value) |
Sets the local value of a resource id property with a resource pointer. More... | |
template<typename DataType > | |
DataType | getProperty (const PropertyType< DataType > &propertyType) const |
Returns the current value of a property. More... | |
template<typename DataType > | |
bool | getProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::DataType &value) const |
Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. More... | |
template<typename DataType > | |
void | setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::DataType value) |
void | setAbstractProperty (AbstractPropertyType abstractPropertyType, ResourceSharedPtr value) |
template<typename DataType > | |
DataType | getAbstractProperty (AbstractPropertyType abstractPropertyType) const |
template<typename DataType > | |
bool | getAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::DataType &value) const |
bool | hasValue (AbstractPropertyType propertyType) const |
Evaluates whether there are any inputs into the property value. More... | |
bool | hasLocalValue (AbstractPropertyType propertyType) const |
Evaluates whether there is a local value set for the property. More... | |
void | removeLocalValue (AbstractPropertyType propertyType) |
Removes the local value associated with the property. More... | |
void | copyLocalValues (const Object &other) |
Copies all local values from another object. More... | |
virtual void | onPropertyChanged (AbstractPropertyType propertyType, KzuPropertyNotificationReason reason) |
Virtual function to handle property change notifications. More... | |
AppliedStyleEntry * | applyObjectStyle (kanzi::StyleSharedPtr style) |
Applies a style to an object. More... | |
void | unapplyObjectStyle (AppliedStyleEntry *appliedStyleEntry) |
void | applyObjectStyles () |
Apply all styles for an object node. More... | |
void | unapplyObjectStyles () |
Unapplies and removes all applied styles. More... | |
Static Public Member Functions | |
static RenderpassSharedPtr | create (Domain *domain) |
![]() | |
static ComposerSharedPtr | create (Domain *domain, string_view name="") |
![]() | |
static const Metaclass * | getStaticMetaclass () |
Returns the metaclass of Object class. More... | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Default implementation that returns empty editor info. More... | |
Protected Member Functions | |
void | applyCameraAndViewport (const Renderer3D *userRenderer, const KzuTransformedObjectNode *transformedCameraNode, RenderContextStack &renderContextStack, const KzuViewport *viewport, const KzuScissor *scissor) |
![]() | |
void | applyChildren (Renderer3D *renderer, const TransformedScene3D *transformedScene, RenderContextStack &renderContextStack) |
![]() | |
KzuResourceLoadState | getLoadState () |
Access. More... | |
![]() | |
void | initialize () |
void | onCopy (const Object &other) |
Static Protected Member Functions | |
static kzsError | applyLight (KzuTransformedObjectNode *transformedObjectNode, Renderer3D *renderer) |
Additional Inherited Members | |
![]() | |
typedef vector< ComposerSharedPtr > | ComposerContainer |
![]() | |
typedef vector < AppliedStyleEntry * > | AppliedStyleContainer |
Applied style container. More... | |
![]() | |
AppliedStyleContainer | m_appliedStyles |
Listing of applied styles applied to this object. More... | |
Render pass passes set of objects to be rendered down to renderer.
Rendering attributes are selected from render pass properties, that includes view port, clear color, depth & stencil buffer and other characteristics.
|
explicit |
|
inline |
Gets the value of FlushAfterRenderProperty.
|
inline |
Sets the value of FlushAfterRenderProperty.
|
inline |
Gets the value of ViewportXProperty.
|
inline |
Sets the value of ViewportXProperty.
|
inline |
Gets the value of ViewportYProperty.
|
inline |
Sets the value of ViewportYProperty.
|
inline |
Gets the value of ViewportWidthProperty.
|
inline |
Sets the value of ViewportWidthProperty.
|
inline |
Gets the value of ViewportHeightProperty.
|
inline |
Sets the value of ViewportHeightProperty.
|
inline |
Gets the value of ViewportTypeProperty.
|
inline |
Sets the value of ViewportTypeProperty.
|
inline |
Gets the value of RenderPassCameraProperty.
|
inline |
Sets the value of RenderPassCameraProperty.
|
inline |
Gets the value of RenderPassObjectSourceProperty.
|
inline |
Sets the value of RenderPassObjectSourceProperty.
|
inline |
Gets the value of RenderPassMaterialProperty.
|
inline |
Sets the value of RenderPassMaterialProperty.
|
inline |
Gets the value of RenderPassRenderTargetProperty.
|
inline |
Sets the value of RenderPassRenderTargetProperty.
|
inline |
Gets the value of FrustumCullingOnProperty.
|
inline |
Sets the value of FrustumCullingOnProperty.
|
inline |
Gets the value of CullModeProperty.
|
inline |
Sets the value of CullModeProperty.
|
inline |
Gets the value of SortBatchesByShaderProperty.
|
inline |
Sets the value of SortBatchesByShaderProperty.
|
inline |
Gets the value of ColorBufferClearColorProperty.
|
inline |
Sets the value of ColorBufferClearColorProperty.
|
inline |
Gets the value of ColorBufferClearEnabledProperty.
|
inline |
Sets the value of ColorBufferClearEnabledProperty.
|
inline |
Gets the value of ColorWriteModeProperty.
|
inline |
Sets the value of ColorWriteModeProperty.
|
inline |
Gets the value of DepthBufferClearEnabledProperty.
|
inline |
Sets the value of DepthBufferClearEnabledProperty.
|
inline |
Gets the value of DepthBufferClearValueProperty.
|
inline |
Sets the value of DepthBufferClearValueProperty.
|
inline |
Gets the value of DepthBufferTestEnabledProperty.
|
inline |
Sets the value of DepthBufferTestEnabledProperty.
|
inline |
Gets the value of DepthBufferWriteEnabledProperty.
|
inline |
Sets the value of DepthBufferWriteEnabledProperty.
|
inline |
Gets the value of StencilBufferClearEnabledProperty.
|
inline |
Sets the value of StencilBufferClearEnabledProperty.
|
inline |
Gets the value of StencilBufferClearValueProperty.
|
inline |
Sets the value of StencilBufferClearValueProperty.
|
inline |
Gets the value of StencilFailOperationProperty.
|
inline |
Sets the value of StencilFailOperationProperty.
|
inline |
Gets the value of StencilPassDepthFailOperationProperty.
|
inline |
Sets the value of StencilPassDepthFailOperationProperty.
|
inline |
Gets the value of StencilPassDepthPassOperationProperty.
|
inline |
Sets the value of StencilPassDepthPassOperationProperty.
|
inline |
Gets the value of StencilFunctionProperty.
|
inline |
Sets the value of StencilFunctionProperty.
|
inline |
Gets the value of StencilFunctionReferenceValueProperty.
|
inline |
Sets the value of StencilFunctionReferenceValueProperty.
|
inline |
Gets the value of StencilFunctionReferenceMaskProperty.
|
inline |
Sets the value of StencilFunctionReferenceMaskProperty.
|
inline |
Gets the value of StencilBufferTestEnabledProperty.
|
inline |
Sets the value of StencilBufferTestEnabledProperty.
|
inline |
Gets the value of RenderPassScissorEnabledProperty.
|
inline |
Sets the value of RenderPassScissorEnabledProperty.
|
inline |
Gets the value of RenderPassScissorXProperty.
|
inline |
Sets the value of RenderPassScissorXProperty.
|
inline |
Gets the value of RenderPassScissorYProperty.
|
inline |
Sets the value of RenderPassScissorYProperty.
|
inline |
Gets the value of RenderPassScissorWidthProperty.
|
inline |
Sets the value of RenderPassScissorWidthProperty.
|
inline |
Gets the value of RenderPassScissorHeightProperty.
|
inline |
Sets the value of RenderPassScissorHeightProperty.
|
inline |
Gets the value of RenderPassScissorTypeProperty.
|
inline |
Sets the value of RenderPassScissorTypeProperty.
|
inline |
Gets the value of ComposerEnabledProperty.
|
inline |
Sets the value of ComposerEnabledProperty.
|
static |
void kanzi::Renderpass::applyBufferSettingsAndCulling | ( | const Renderer3D * | userRenderer | ) | const |
void kanzi::Renderpass::setObjectSource | ( | ObjectSourceSharedPtr | objectSource | ) |
Sets an object source for render pass.
KzuObjectSource* kanzi::Renderpass::getObjectSource | ( | ) | const |
Gets object source from render pass.
void kanzi::Renderpass::setColorBuffer | ( | bool | clearEnabled, |
ColorRGBA | clearColor, | ||
GraphicsColorWriteMode | writeMode | ||
) |
Sets a color buffer for render pass.
void kanzi::Renderpass::setDepthBuffer | ( | bool | depthClearEnabled, |
float | clearValue, | ||
bool | depthTestEnabled, | ||
bool | depthWriteEnabled | ||
) |
Sets a depth buffer for render pass.
renderPass | renderPass to be applied. |
depthClearEnabled | Is depth buffer cleared on beginning of this renderpass. |
clearValue | clearValue clear value used if clearing enabled, use KZU_RENDER_PASS_DEFAULT_DEPTH_CLEAR_VALUE by default. |
depthTestEnabled | Depth testing enabled / disabled. |
depthWriteEnabled | Writing to depth buffer enabled / disabled. |
void kanzi::Renderpass::setStencilBuffer | ( | bool | stencilClearEnabled, |
unsigned int | clearValue, | ||
bool | stencilTestEnabled, | ||
GraphicsStencilOperation | stencilModeSfail, | ||
GraphicsStencilOperation | stencilModeDPfail, | ||
GraphicsStencilOperation | stencilModeDPpass, | ||
GraphicsCompareFunction | stencilFunction | ||
) |
Sets a stencil buffer for render pass.
void kanzi::Renderpass::setViewportAbsolute | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned int | width, | ||
unsigned int | height | ||
) |
Sets the view port's size in absolute coordinates (pixels)
void kanzi::Renderpass::setViewportRelative | ( | float | x, |
float | y, | ||
float | width, | ||
float | 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 kanzi::Renderpass::setRenderOnce | ( | bool | renderOnce | ) |
Sets render pass to state where it gets rendered once and is disabled after that.
void kanzi::Renderpass::iterateTransformedObjects | ( | Renderer3D * | renderer, |
const KzcDynamicArray * | transformedObjects, | ||
Renderer3D::ApplyObjectFunction | applyFunction | ||
) |
|
virtual |
Function for loading the resource from .KZB.
This function is called when loading the data from .KZB file. Implementations should call super class loadFromKZB before reading anything else from inputStream. This function is called from arbitrary loading threads. The parameter threadContext contains thread safe memory manager and a thread specific Property manager which can be locked with the threadLock in the threadContext. This function may not access resource manager or the UIDomain due to race conditions.
Reimplemented from kanzi::Composer.
|
virtual |
Reimplemented from kanzi::Composer.
|
virtual |
Reimplemented from kanzi::Composer.
|
virtual |
Reimplemented from kanzi::Composer.
|
protected |
|
staticprotected |
|
static |
FlushAfterRender property.
The default value is false.
|
static |
|
static |
|
static |
|
static |
ViewportHeight property.
The default value is 1.0f.
|
static |
ViewportType property.
The default value is KZU_VIEWPORT_COORDINATE_RELATIVE.
|
static |
RenderPassCamera property.
The default value is "".
|
static |
RenderPassObjectSource property.
The default value is ResourceID().
|
static |
RenderPassMaterial property.
The default value is ResourceID().
|
static |
RenderPassRenderTarget property.
The default value is ResourceID().
|
static |
FrustumCullingOn property.
The default value is false.
|
static |
|
static |
|
static |
SortBatchesByShader property.
The default value is false.
|
static |
ColorBufferClearColor property.
The default value is ColorRGBA(0.4f, 0.4f, 0.4f, 1.0f).
|
static |
ColorBufferClearEnabled property.
The default value is false.
|
static |
ColorWriteMode property.
The default value is GraphicsColorWriteModeRGBA.
|
static |
DepthBufferClearEnabled property.
The default value is true.
|
static |
DepthBufferClearValue property.
The default value is 1.0f.
|
static |
DepthBufferTestEnabled property.
The default value is true.
|
static |
DepthBufferWriteEnabled property.
The default value is true.
|
static |
StencilBufferClearEnabled property.
The default value is false.
|
static |
StencilBufferClearValue property.
The default value is 0.
|
static |
StencilFailOperation property.
The default value is GraphicsStencilOperationKeep.
|
static |
StencilPassDepthFailOperation property.
The default value is GraphicsStencilOperationKeep.
|
static |
StencilPassDepthPassOperation property.
The default value is GraphicsStencilOperationKeep.
|
static |
StencilFunction property.
The default value is GraphicsCompareFunctionNever.
|
static |
StencilFunctionReferenceValue property.
The default value is 0.
|
static |
StencilFunctionReferenceMask property.
The default value is 255.
|
static |
StencilBufferTestEnabled property.
The default value is false.
|
static |
RenderPassScissorEnabled property.
The default value is false.
|
static |
RenderPassScissorX property.
The default value is 0.0f.
|
static |
RenderPassScissorY property.
The default value is 0.0f.
|
static |
RenderPassScissorWidth property.
The default value is 1.0f.
|
static |
RenderPassScissorHeight property.
The default value is 1.0f.
|
static |
RenderPassScissorType property.
The default value is KZU_VIEWPORT_COORDINATE_RELATIVE.
|
static |
ComposerEnabled property.
The default value is true.