The Video::IRenderer interface represents a generic video renderer. More...

#include "murl_video_i_renderer.h"

Inheritance diagram for Murl::Video::IRenderer:

Public Member Functions

virtual IEnums::VideoApi GetApi () const =0
 Get the underlying video API. More...
 
virtual UInt32 GetNumberOfSupportedShaderLanguages () const =0
 Get the number of supported shader languages. More...
 
virtual IEnums::ShaderLanguage GetSupportedShaderLanguage (UInt32 index) const =0
 Get the supported shader language for a given index. More...
 
virtual Bool Init (IEngine *engine, const IAppConfiguration *appConfig, IFeatureSet *features, IVideoInterface *videoInterface, UInt32 sizeX, UInt32 sizeY)=0
 Initialize the renderer. More...
 
virtual Bool DeInit ()=0
 De-initialize the renderer. More...
 
virtual Bool Start ()=0
 Start the renderer after it has been initialized. More...
 
virtual Bool Stop ()=0
 Stop the renderer before it gets deinitialized. More...
 
virtual Bool Pause ()=0
 Pause the renderer if it is running. More...
 
virtual Bool Continue ()=0
 Continue the renderer if it is paused. More...
 
virtual Bool SaveData ()=0
 Save the renderer data. More...
 
virtual Bool Suspend ()=0
 Suspend the renderer. More...
 
virtual Bool Resume ()=0
 Resume the renderer. More...
 
virtual const IFeatureSetGetFeatures () const =0
 Get the available features. More...
 
virtual IObjectCreateObject (const String &className)=0
 Create a renderer object. More...
 
virtual Bool DestroyObject (IObject *&object)=0
 Destroy an object that was created by this renderer. More...
 
virtual IBatchCreateBatch ()=0
 Create a renderer batch. More...
 
virtual Bool DestroyBatch (IBatch *&batch)=0
 Destroy a batch that was created by this renderer. More...
 
virtual Bool SetOutputSize (UInt32 sizeX, UInt32 sizeY)=0
 Set the current output surface dimensions. More...
 
virtual Bool BeginSubmission ()=0
 Begin submission of renderer objects for the next frame. More...
 
virtual Bool EndSubmission ()=0
 End submission of renderer objects for the next frame. More...
 
virtual Bool BeginRendering (IEnums::SuspendTrigger trigger)=0
 Start the actual rendering process after all current objects have been submitted. More...
 
virtual Bool EndRendering ()=0
 Wait for the current rendering process to complete, after calling BeginRendering(). More...
 
virtual Bool BeginBatchRendering (IBatch *batch)=0
 Start the rendering process for an existing static batch. More...
 
virtual Bool EndBatchRendering (IBatch *batch)=0
 Finalize the rendering process for an existing static batch. More...
 
virtual Bool RegisterRenderThread (UInt64 threadId)=0
 Register the actual render (main) thread with the renderer. More...
 
virtual Bool RegisterLogicThread (UInt64 threadId)=0
 Register the logic processing thread with the renderer. More...
 
virtual Bool RegisterLoaderThread (UInt64 threadId)=0
 Register the background loader thread with the renderer. More...
 
virtual Bool UnregisterRenderThread (UInt64 threadId)=0
 Unregister a render (main) thread from the renderer. More...
 
virtual Bool UnregisterLogicThread (UInt64 threadId)=0
 Unregister a logic processing thread from the renderer. More...
 
virtual Bool UnregisterLoaderThread (UInt64 threadId)=0
 Unregister a background loader thread from the renderer. More...
 
virtual Bool RegisterAutomaticallySuspendableObject (IObject *object)=0
 Register an object for automatic resource suspension. More...
 
virtual Bool UnregisterAutomaticallySuspendableObject (IObject *object)=0
 Unregister an object from automatic resource suspension. More...
 
virtual Bool RegisterManuallySuspendableObject (IObject *object)=0
 Register an object for manual resource suspension. More...
 
virtual Bool UnregisterManuallySuspendableObject (IObject *object)=0
 Unregister an object from manual resource suspension. More...
 
virtual Bool RegisterEmergencySuspendableObject (IObject *object)=0
 Register an object for emergency resource suspension. More...
 
virtual Bool UnregisterEmergencySuspendableObject (IObject *object)=0
 Unregister an object from emergency resource suspension. More...
 
virtual Bool CheckConcurrency () const =0
 Verify that the caller is allowed to manipulate an object. More...
 
virtual Bool InvokeOnRenderThread (const IMethodCall *call, Bool force) const =0
 Invoke a call to an object method on a suitable render thread. More...
 
virtual void SetCurrentCamera (ICamera *camera)=0
 Set the current camera affecting subsequent drawables. More...
 
virtual void SetCurrentLayer (UInt32 layer)=0
 Set the current layer affecting subsequent drawables. More...
 
virtual void SetCurrentTransform (const Matrix *transform, SInt32 depthOrder)=0
 Set the current world transform affecting subsequent drawables. More...
 
virtual void SetCurrentMaterial (IMaterial *material)=0
 Set the current material affecting subsequent drawables. More...
 
virtual void SetCurrentConstants (IConstants *constants)=0
 Set the current shader variables affecting subsequent drawables. More...
 
virtual void SetCurrentTexture (ITexture *texture, UInt32 unit)=0
 Set a single texture at a given unit affecting subsequent drawables. More...
 
virtual void SetCurrentNumberOfTextureUnitsUsed (UInt32 numberOfUnitsUsed)=0
 Set the number of active texture units affecting subsequent drawables. More...
 
virtual void SetCurrentTextures (ITexture **textures, UInt32 numberOfUnitsUsed)=0
 Set multiple texture units affecting subsequent drawables. More...
 
virtual void SetCurrentLight (ILight *light, UInt32 unit)=0
 Set a single light source at a given unit affecting subsequent drawables. More...
 
virtual void SetCurrentNumberOfLightUnitsUsed (UInt32 numberOfUnitsUsed)=0
 Set the number of active light source units affecting subsequent drawables. More...
 
virtual void SetCurrentLights (ILight **lights, UInt32 numberOfUnitsUsed)=0
 Set multiple light source units affecting subsequent drawables. More...
 
virtual void SetCurrentBone (IBone *bone, UInt32 unit)=0
 Set a single bone at a given unit affecting subsequent drawables. More...
 
virtual void SetCurrentNumberOfBoneUnitsUsed (UInt32 numberOfUnitsUsed)=0
 Set the number of active bone units affecting subsequent drawables. More...
 
virtual void SetCurrentBones (IBone **bones, UInt32 numberOfUnitsUsed)=0
 Set multiple bone units affecting subsequent drawables. More...
 
virtual void PushObjectForUpdate (IObject *object, Real localTime=0.0)=0
 Queue up an object for updating. More...
 
virtual void PushObjectForRendering (IVertices *vertices, IIndices *indices)=0
 Queue up a drawable object for rendering. More...
 
virtual void PushObjectForRendering (IDrawable *drawable)=0
 Queue up a drawable object for rendering. More...
 
virtual void PushBatchForRendering (IBatch *batch)=0
 Queue up a static batch for rendering. More...
 
virtual UInt32 GetCurrentNumberOfTextureUnitsNeeded () const =0
 Get the current number of texture units needed for rendering. More...
 
virtual UInt32 GetCurrentNumberOfLightUnitsNeeded () const =0
 Get the current number of light units needed for rendering. More...
 
virtual UInt32 GetCurrentNumberOfBoneUnitsNeeded () const =0
 Get the current number of bone units needed for rendering. More...
 
virtual SInt32 GetCurrentLightTextureUnit (UInt32 lightUnit) const =0
 Get the currently active shader's light texture unit, if used. More...
 
virtual Bool LockStatistics ()=0
 Lock the module statistics. More...
 
virtual Bool UnlockStatistics ()=0
 Unlock the module statistics. More...
 
virtual UInt64 GetAllocatedResourceByteSize (IEnums::MemoryType memoryType) const =0
 Query the total number of allocated resource bytes. More...
 
virtual UInt32 GetNumberOfObjectsCreated () const =0
 Query the number objects created after the most recent cycle. More...
 
virtual UInt32 GetNumberOfObjectsSuspended () const =0
 Query the number objects suspended after the most recent cycle. More...
 
virtual UInt32 GetNumberOfObjectsRendered () const =0
 Query the number of most recently rendered objects. More...
 
virtual UInt32 GetNumberOfBatchesRendered () const =0
 Query the number of most recently rendered object batches. More...
 
virtual Bool CollectStatisticsObjects (Index< const IStatisticsObject * > &objects) const =0
 Populate a given index with all objects currently present in the renderer. More...
 
virtual SInt32 AcquireIndexBufferId (const String &indexBufferName)=0
 Acquire a unique integer ID from a given index buffer name. More...
 
virtual SInt32 AcquireVertexBufferId (const String &vertexBufferName)=0
 Acquire a unique integer ID from a given vertex buffer name. More...
 
virtual SInt32 AcquireConstantBufferId (const String &constantBufferName)=0
 Acquire a unique integer ID from a given constant buffer name. More...
 
virtual SInt32 AcquireUniformId (const String &uniformName)=0
 Acquire a unique integer ID from a given uniform variable name. More...
 
virtual SInt32 AcquireAttributeId (const String &attributeName)=0
 Acquire a unique integer ID from a given attribute variable name. More...
 
virtual const StringGetIndexBufferName (SInt32 id) const =0
 Get the actual name of an index buffer by its unique integer ID. More...
 
virtual const StringGetVertexBufferName (SInt32 id) const =0
 Get the actual name of an vertex buffer by its unique integer ID. More...
 
virtual const StringGetConstantBufferName (SInt32 id) const =0
 Get the actual name of an constant buffer by its unique integer ID. More...
 
virtual const StringGetUniformName (SInt32 id) const =0
 Get the actual name of a uniform variable by its unique integer ID. More...
 
virtual const StringGetAttributeName (SInt32 id) const =0
 Get the actual name of an attribute variable by its unique integer ID. More...
 
virtual UInt32 AcquireConstantBufferSignature (const IConstantBuffer *constantBuffer)=0
 Acquire a signature for a given constant buffer object. More...
 
virtual Bool ReleaseConstantBufferSignature (const IConstantBuffer *constantBuffer)=0
 Release the signature of a given constant buffer object. More...
 
virtual UInt32 AcquireConstantsSignature (const IConstants *constants)=0
 Acquire a signature for a given constant buffer group object. More...
 
virtual Bool ReleaseConstantsSignature (const IConstants *constants)=0
 Release the signature of a given constant buffer group object. More...
 
virtual UInt32 AcquireIndexBufferSignature (const IIndexBuffer *indexBuffer)=0
 Acquire a signature for a given index buffer object. More...
 
virtual Bool ReleaseIndexBufferSignature (const IIndexBuffer *indexBuffer)=0
 Release the signature of a given index buffer object. More...
 
virtual UInt32 AcquireIndicesSignature (const IIndices *indices)=0
 Acquire a signature for a given index buffer group object. More...
 
virtual Bool ReleaseIndicesSignature (const IIndices *indices)=0
 Release the signature of a given index buffer group object. More...
 
virtual UInt32 AcquireVertexBufferSignature (const IVertexBuffer *vertexBuffer)=0
 Acquire a signature for a given vertex buffer object. More...
 
virtual Bool ReleaseVertexBufferSignature (const IVertexBuffer *vertexBuffer)=0
 Release the signature of a given vertex buffer object. More...
 
virtual UInt32 AcquireVerticesSignature (const IVertices *vertices)=0
 Acquire a signature for a given vertex buffer group object. More...
 
virtual Bool ReleaseVerticesSignature (const IVertices *vertices)=0
 Release the signature of a given vertex buffer group object. More...
 
virtual void IncreaseNumberOfResourceBytesAllocated (IEnums::MemoryType memoryType, UInt64 numBytes)=0
 Increase the internal number of allocated resource bytes. More...
 
virtual void DecreaseNumberOfResourceBytesAllocated (IEnums::MemoryType memoryType, UInt64 numBytes)=0
 Decrease the internal number of allocated resource bytes. More...
 
virtual void IncreaseNumberOfObjectsSuspended ()=0
 Increase the internal suspended object count by 1. More...
 
virtual void DecreaseNumberOfObjectsSuspended ()=0
 Decrease the internal suspended object count by 1. More...
 
virtual Bool ValidateFrameBufferFormat (IEnums::PixelFormat &colorPixelFormat, IEnums::DepthBufferFormat &depthBufferFormat, IEnums::StencilBufferFormat &stencilBufferFormat)=0
 Validate a frame buffer format. More...
 
virtual Bool TakeScreenshot (IVideoStream *outputStream, IEnums::Orientation windowOrientation)=0
 Take a screenshot. More...
 
virtual Bool WaitDeviceIdle ()=0
 waits until device is idle More...
 
- Public Member Functions inherited from Murl::IFactoryObject< IRenderer >
 ~IFactoryObject () override
 The destructor.
 
virtual const ClassInfo * GetObjectClassInfo () const=0
 Get the object instance's class info, if present. More...
 
virtual void ResetObjectProperties ()=0
 Reset the object instance's properties to their default values.
 
- Public Member Functions inherited from Murl::Video::IRendererRegistry
virtual Bool RegisterObjectClass (const IObject::ClassInfo &classInfo)=0
 Register an object class. More...
 
virtual Bool UnregisterObjectClass (const IObject::ClassInfo &classInfo)=0
 Unregister a previously registered object class. More...
 
virtual SInt32 GetRegisteredObjectClassInfoIndex (const IObject::ClassInfo &classInfo) const =0
 Query the index of a registered object class, by its ClassInfo structure. More...
 
virtual SInt32 GetRegisteredObjectClassInfoIndex (const String &className) const =0
 Query the index of a registered object class, by its class name. More...
 
virtual UInt32 GetNumberOfRegisteredObjectClassInfos () const =0
 Get the total number of registered object classes. More...
 
virtual const IObject::ClassInfo * GetRegisteredObjectClassInfo (UInt32 index) const =0
 Get the ClassInfo structure of a registered object class. More...
 

Additional Inherited Members

- Public Types inherited from Murl::IFactoryObject< IRenderer >
using ClassInfoArray = Array< const ClassInfo * >
 Definition of an array of ClassInfo objects.
 
- Static Public Member Functions inherited from Murl::IFactoryObject< IRenderer >
static const PropertyInfoGetPropertyInfo ()
 Get the class' property info struct. More...
 
static const AttributeInfoGetAttributeInfo ()
 Get the class' attribute info struct. More...
 
static void ResetProperties (IFactoryObject< IRenderer > *object)
 Reset an object instance's properties to their default values. More...
 

Detailed Description

The Video::IRenderer interface represents a generic video renderer.

For most cases, an application does not need to directly interact with this interface. Instead, using video-related nodes from the Murl::Graph Node Interfaces or Murl::Graph Node Classes sections is the preferred way to implement visual output functionality in a cross-platform manner.

Accessing the video renderer interface directly may be useful in advanced use cases, when creating custom video objects or even a complete custom renderer suite.

Member Function Documentation

◆ GetApi()

virtual IEnums::VideoApi Murl::Video::IRenderer::GetApi ( ) const
pure virtual

Get the underlying video API.

Returns
The used video API.

◆ GetNumberOfSupportedShaderLanguages()

virtual UInt32 Murl::Video::IRenderer::GetNumberOfSupportedShaderLanguages ( ) const
pure virtual

Get the number of supported shader languages.

If the renderer does not support programmable shaders, this method returns 0. Otherwise, the number of supported languages is returned, the individual languages can be queried using GetSupportedShaderLanguage() with an index from 0 to GetNumberOfSupportedShaderLanguages()-1; the most preferable shader language can be found at index 0.

Returns
The number of supported languages.

◆ GetSupportedShaderLanguage()

virtual IEnums::ShaderLanguage Murl::Video::IRenderer::GetSupportedShaderLanguage ( UInt32  index) const
pure virtual

Get the supported shader language for a given index.

Parameters
indexThe index, from 0 to GetNumberOfSupportedShaderLanguages()-1.
Returns
The supported language.

◆ Init()

virtual Bool Murl::Video::IRenderer::Init ( IEngine engine,
const IAppConfiguration appConfig,
IFeatureSet features,
IVideoInterface videoInterface,
UInt32  sizeX,
UInt32  sizeY 
)
pure virtual

Initialize the renderer.

Parameters
engineThe engine to attach to.
appConfigThe application configuration object.
featuresThe feature set to possibly update according to this renderer' capabilities.
videoInterfaceAn interface to the platform front end's video interface for managing contexts etc.
sizeXThe initial horizontal output surface size in pixels.
sizeYThe initial vertical output surface size in pixels.
Returns
true if successful.

◆ DeInit()

virtual Bool Murl::Video::IRenderer::DeInit ( )
pure virtual

De-initialize the renderer.

Returns
true if successful.

◆ Start()

virtual Bool Murl::Video::IRenderer::Start ( )
pure virtual

Start the renderer after it has been initialized.

Returns
true if successful.

◆ Stop()

virtual Bool Murl::Video::IRenderer::Stop ( )
pure virtual

Stop the renderer before it gets deinitialized.

Returns
true if successful.

◆ Pause()

virtual Bool Murl::Video::IRenderer::Pause ( )
pure virtual

Pause the renderer if it is running.

Returns
true if successful.

◆ Continue()

virtual Bool Murl::Video::IRenderer::Continue ( )
pure virtual

Continue the renderer if it is paused.

Returns
true if successful.

◆ SaveData()

virtual Bool Murl::Video::IRenderer::SaveData ( )
pure virtual

Save the renderer data.

Returns
true if successful.

◆ Suspend()

virtual Bool Murl::Video::IRenderer::Suspend ( )
pure virtual

Suspend the renderer.

Returns
true if successful.

◆ Resume()

virtual Bool Murl::Video::IRenderer::Resume ( )
pure virtual

Resume the renderer.

Returns
true if successful.

◆ GetFeatures()

virtual const IFeatureSet* Murl::Video::IRenderer::GetFeatures ( ) const
pure virtual

Get the available features.

Returns
The set of available features.

◆ CreateObject()

virtual IObject* Murl::Video::IRenderer::CreateObject ( const String className)
pure virtual

Create a renderer object.

Parameters
classNameThe class name of the renderer object to create.
Returns
The newly created object, or null if failed.

◆ DestroyObject()

virtual Bool Murl::Video::IRenderer::DestroyObject ( IObject *&  object)
pure virtual

Destroy an object that was created by this renderer.

Parameters
objectA reference to a pointer containing the object to destroy.
Returns
true if successful.

◆ CreateBatch()

virtual IBatch* Murl::Video::IRenderer::CreateBatch ( )
pure virtual

Create a renderer batch.

Returns
The newly created batch, or null if failed.

◆ DestroyBatch()

virtual Bool Murl::Video::IRenderer::DestroyBatch ( IBatch *&  batch)
pure virtual

Destroy a batch that was created by this renderer.

Parameters
batchA reference to a pointer containing the batch to destroy.
Returns
true if successful.

◆ SetOutputSize()

virtual Bool Murl::Video::IRenderer::SetOutputSize ( UInt32  sizeX,
UInt32  sizeY 
)
pure virtual

Set the current output surface dimensions.

Parameters
sizeXThe current horizontal output surface size in pixels.
sizeYThe current vertical output surface size in pixels.
Returns
true if successful.

◆ BeginSubmission()

virtual Bool Murl::Video::IRenderer::BeginSubmission ( )
pure virtual

Begin submission of renderer objects for the next frame.

Any calls to state-changing methods like SetCurrentMaterial(), SetCurrentCamera() etc. as well as any queueing methods like PushObjectForRendering() must happen between a call to this method and the corresponding EndSubmission() call.

Returns
true if successful.

◆ EndSubmission()

virtual Bool Murl::Video::IRenderer::EndSubmission ( )
pure virtual

End submission of renderer objects for the next frame.

Returns
true if successful.

◆ BeginRendering()

virtual Bool Murl::Video::IRenderer::BeginRendering ( IEnums::SuspendTrigger  trigger)
pure virtual

Start the actual rendering process after all current objects have been submitted.

Parameters
triggerThe suspend trigger to apply. If set to a value other than IEnums::SUSPEND_TRIGGER_NONE, all objects registered for that trigger type (manual or emergency) are commanded to release any resources that are not currently needed.
Returns
true if successful.

◆ EndRendering()

virtual Bool Murl::Video::IRenderer::EndRendering ( )
pure virtual

Wait for the current rendering process to complete, after calling BeginRendering().

Returns
true if successful.

◆ BeginBatchRendering()

virtual Bool Murl::Video::IRenderer::BeginBatchRendering ( IBatch batch)
pure virtual

Start the rendering process for an existing static batch.

Parameters
batchThe batch to render.
Returns
true if successful.

◆ EndBatchRendering()

virtual Bool Murl::Video::IRenderer::EndBatchRendering ( IBatch batch)
pure virtual

Finalize the rendering process for an existing static batch.

Parameters
batchThe batch to render.
Returns
true if successful.

◆ RegisterRenderThread()

virtual Bool Murl::Video::IRenderer::RegisterRenderThread ( UInt64  threadId)
pure virtual

Register the actual render (main) thread with the renderer.

Parameters
threadIdThe thread ID of the main thread.
Returns
true if successful.

◆ RegisterLogicThread()

virtual Bool Murl::Video::IRenderer::RegisterLogicThread ( UInt64  threadId)
pure virtual

Register the logic processing thread with the renderer.

Parameters
threadIdThe thread ID of the logic thread.
Returns
true if successful.

◆ RegisterLoaderThread()

virtual Bool Murl::Video::IRenderer::RegisterLoaderThread ( UInt64  threadId)
pure virtual

Register the background loader thread with the renderer.

Parameters
threadIdThe thread ID of the loader thread.
Returns
true if successful.

◆ UnregisterRenderThread()

virtual Bool Murl::Video::IRenderer::UnregisterRenderThread ( UInt64  threadId)
pure virtual

Unregister a render (main) thread from the renderer.

Parameters
threadIdThe thread ID of the main thread.
Returns
true if successful.

◆ UnregisterLogicThread()

virtual Bool Murl::Video::IRenderer::UnregisterLogicThread ( UInt64  threadId)
pure virtual

Unregister a logic processing thread from the renderer.

Parameters
threadIdThe thread ID of the logic thread.
Returns
true if successful.

◆ UnregisterLoaderThread()

virtual Bool Murl::Video::IRenderer::UnregisterLoaderThread ( UInt64  threadId)
pure virtual

Unregister a background loader thread from the renderer.

Parameters
threadIdThe thread ID of the loader thread.
Returns
true if successful.

◆ RegisterAutomaticallySuspendableObject()

virtual Bool Murl::Video::IRenderer::RegisterAutomaticallySuspendableObject ( IObject object)
pure virtual

Register an object for automatic resource suspension.

Parameters
objectThe object to register.
Returns
true if successful.

◆ UnregisterAutomaticallySuspendableObject()

virtual Bool Murl::Video::IRenderer::UnregisterAutomaticallySuspendableObject ( IObject object)
pure virtual

Unregister an object from automatic resource suspension.

Parameters
objectThe object to unregister.
Returns
true if successful.

◆ RegisterManuallySuspendableObject()

virtual Bool Murl::Video::IRenderer::RegisterManuallySuspendableObject ( IObject object)
pure virtual

Register an object for manual resource suspension.

Parameters
objectThe object to register.
Returns
true if successful.

◆ UnregisterManuallySuspendableObject()

virtual Bool Murl::Video::IRenderer::UnregisterManuallySuspendableObject ( IObject object)
pure virtual

Unregister an object from manual resource suspension.

Parameters
objectThe object to unregister.
Returns
true if successful.

◆ RegisterEmergencySuspendableObject()

virtual Bool Murl::Video::IRenderer::RegisterEmergencySuspendableObject ( IObject object)
pure virtual

Register an object for emergency resource suspension.

Parameters
objectThe object to register.
Returns
true if successful.

◆ UnregisterEmergencySuspendableObject()

virtual Bool Murl::Video::IRenderer::UnregisterEmergencySuspendableObject ( IObject object)
pure virtual

Unregister an object from emergency resource suspension.

Parameters
objectThe object to unregister.
Returns
true if successful.

◆ CheckConcurrency()

virtual Bool Murl::Video::IRenderer::CheckConcurrency ( ) const
pure virtual

Verify that the caller is allowed to manipulate an object.

On release builds, or if video API checks are disabled (set via IEngineConfiguration::SetVideoApiChecksEnabled()) this method always returns true. Otherwise, it only returns true when the caller is running on a registered render or loader thread.

Returns
true if successful.

◆ InvokeOnRenderThread()

virtual Bool Murl::Video::IRenderer::InvokeOnRenderThread ( const IMethodCall call,
Bool  force 
) const
pure virtual

Invoke a call to an object method on a suitable render thread.

If the platform supports video API calls on a thread other than the (single) main render thread, this feature is also enabled in the engine configuration (See IEngineConfiguration::SetAsyncLoadingEnabled()), and the current thread is not the logic thread, this method tries to directly call the given method. Otherwise, and also if the force parameter is set to true, the call is invoked on the main render thread and this method blocks until the call is finished.

Parameters
callA call handle, obtained via Util::CreateMethodCall().
forceIf true, main thread invocation is forced.
Returns
true if successful.

◆ SetCurrentCamera()

virtual void Murl::Video::IRenderer::SetCurrentCamera ( ICamera camera)
pure virtual

Set the current camera affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
cameraThe camera to activate.

◆ SetCurrentLayer()

virtual void Murl::Video::IRenderer::SetCurrentLayer ( UInt32  layer)
pure virtual

Set the current layer affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
layerThe layer index to set.

◆ SetCurrentTransform()

virtual void Murl::Video::IRenderer::SetCurrentTransform ( const Matrix transform,
SInt32  depthOrder 
)
pure virtual

Set the current world transform affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
transformThe world transform to apply.
depthOrderThe depth (sorting) order.

◆ SetCurrentMaterial()

virtual void Murl::Video::IRenderer::SetCurrentMaterial ( IMaterial material)
pure virtual

Set the current material affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
materialThe material to apply.

◆ SetCurrentConstants()

virtual void Murl::Video::IRenderer::SetCurrentConstants ( IConstants constants)
pure virtual

Set the current shader variables affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
constantsThe shader variables to apply.

◆ SetCurrentTexture()

virtual void Murl::Video::IRenderer::SetCurrentTexture ( ITexture texture,
UInt32  unit 
)
pure virtual

Set a single texture at a given unit affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
textureThe texture to apply.
unitThe texture unit, from 0 to IEnums::NUM_TEXTURE_UNITS-1.

◆ SetCurrentNumberOfTextureUnitsUsed()

virtual void Murl::Video::IRenderer::SetCurrentNumberOfTextureUnitsUsed ( UInt32  numberOfUnitsUsed)
pure virtual

Set the number of active texture units affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
numberOfUnitsUsedThe current number of active texture units, from 0 to IEnums::NUM_TEXTURE_UNITS-1.

◆ SetCurrentTextures()

virtual void Murl::Video::IRenderer::SetCurrentTextures ( ITexture **  textures,
UInt32  numberOfUnitsUsed 
)
pure virtual

Set multiple texture units affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
texturesAn array of textures to apply.
numberOfUnitsUsedThe actual number of textures to activate, from 0 to IEnums::NUM_TEXTURE_UNITS-1.

◆ SetCurrentLight()

virtual void Murl::Video::IRenderer::SetCurrentLight ( ILight light,
UInt32  unit 
)
pure virtual

Set a single light source at a given unit affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
lightThe light source to apply.
unitThe light unit, from 0 to IEnums::NUM_LIGHT_UNITS-1.

◆ SetCurrentNumberOfLightUnitsUsed()

virtual void Murl::Video::IRenderer::SetCurrentNumberOfLightUnitsUsed ( UInt32  numberOfUnitsUsed)
pure virtual

Set the number of active light source units affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
numberOfUnitsUsedThe current number of active light units, from 0 to IEnums::NUM_LIGHT_UNITS-1.

◆ SetCurrentLights()

virtual void Murl::Video::IRenderer::SetCurrentLights ( ILight **  lights,
UInt32  numberOfUnitsUsed 
)
pure virtual

Set multiple light source units affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
lightsAn array of light sources to apply.
numberOfUnitsUsedThe actual number of light sources to activate, from 0 to IEnums::NUM_LIGHT_UNITS-1.

◆ SetCurrentBone()

virtual void Murl::Video::IRenderer::SetCurrentBone ( IBone bone,
UInt32  unit 
)
pure virtual

Set a single bone at a given unit affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
boneThe bone to apply.
unitThe bone unit, from 0 to IEnums::NUM_BONE_UNITS-1.

◆ SetCurrentNumberOfBoneUnitsUsed()

virtual void Murl::Video::IRenderer::SetCurrentNumberOfBoneUnitsUsed ( UInt32  numberOfUnitsUsed)
pure virtual

Set the number of active bone units affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
numberOfUnitsUsedThe current number of active bone units, from 0 to IEnums::NUM_BONE_UNITS-1.

◆ SetCurrentBones()

virtual void Murl::Video::IRenderer::SetCurrentBones ( IBone **  bones,
UInt32  numberOfUnitsUsed 
)
pure virtual

Set multiple bone units affecting subsequent drawables.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
bonesAn array of bones to apply.
numberOfUnitsUsedThe actual number of bones to activate, from 0 to IEnums::NUM_BONE_UNITS-1.

◆ PushObjectForUpdate()

virtual void Murl::Video::IRenderer::PushObjectForUpdate ( IObject object,
Real  localTime = 0.0 
)
pure virtual

Queue up an object for updating.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
objectThe object to queue up.
localTimeThe time stamp.

◆ PushObjectForRendering() [1/2]

virtual void Murl::Video::IRenderer::PushObjectForRendering ( IVertices vertices,
IIndices indices 
)
pure virtual

Queue up a drawable object for rendering.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
verticesThe drawable's vertices to queue up.
indicesThe drawable's optional indices to queue up.

◆ PushObjectForRendering() [2/2]

virtual void Murl::Video::IRenderer::PushObjectForRendering ( IDrawable drawable)
pure virtual

Queue up a drawable object for rendering.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
drawableThe drawable to queue up.

◆ PushBatchForRendering()

virtual void Murl::Video::IRenderer::PushBatchForRendering ( IBatch batch)
pure virtual

Queue up a static batch for rendering.

This method must only be called between BeginSubmission() and EndSubmission().

Parameters
batchThe batch to queue up.

◆ GetCurrentNumberOfTextureUnitsNeeded()

virtual UInt32 Murl::Video::IRenderer::GetCurrentNumberOfTextureUnitsNeeded ( ) const
pure virtual

Get the current number of texture units needed for rendering.

Returns
The number of active texture units.

◆ GetCurrentNumberOfLightUnitsNeeded()

virtual UInt32 Murl::Video::IRenderer::GetCurrentNumberOfLightUnitsNeeded ( ) const
pure virtual

Get the current number of light units needed for rendering.

Returns
The number of active light units.

◆ GetCurrentNumberOfBoneUnitsNeeded()

virtual UInt32 Murl::Video::IRenderer::GetCurrentNumberOfBoneUnitsNeeded ( ) const
pure virtual

Get the current number of bone units needed for rendering.

Returns
The number of active bone units.

◆ GetCurrentLightTextureUnit()

virtual SInt32 Murl::Video::IRenderer::GetCurrentLightTextureUnit ( UInt32  lightUnit) const
pure virtual

Get the currently active shader's light texture unit, if used.

When the currently active shader renders projective lights, this method returns the shader's actually used texture unit for a given light unit. Otherwise, -1 is returned.

Parameters
lightUnitThe light unit to check.
Returns
The texture unit used. or -1 if not used.

◆ LockStatistics()

virtual Bool Murl::Video::IRenderer::LockStatistics ( )
pure virtual

Lock the module statistics.

Returns
true if successful.

◆ UnlockStatistics()

virtual Bool Murl::Video::IRenderer::UnlockStatistics ( )
pure virtual

Unlock the module statistics.

Returns
true if successful.

◆ GetAllocatedResourceByteSize()

virtual UInt64 Murl::Video::IRenderer::GetAllocatedResourceByteSize ( IEnums::MemoryType  memoryType) const
pure virtual

Query the total number of allocated resource bytes.

Must be called after EndRendering().

Parameters
memoryTypeThe type of memory.
Returns
The number of allocated bytes.

◆ GetNumberOfObjectsCreated()

virtual UInt32 Murl::Video::IRenderer::GetNumberOfObjectsCreated ( ) const
pure virtual

Query the number objects created after the most recent cycle.

Must be called after EndRendering().

Returns
The number of created objects.

◆ GetNumberOfObjectsSuspended()

virtual UInt32 Murl::Video::IRenderer::GetNumberOfObjectsSuspended ( ) const
pure virtual

Query the number objects suspended after the most recent cycle.

Must be called after EndRendering().

Returns
The number of suspended objects.

◆ GetNumberOfObjectsRendered()

virtual UInt32 Murl::Video::IRenderer::GetNumberOfObjectsRendered ( ) const
pure virtual

Query the number of most recently rendered objects.

Must be called after EndRendering().

Returns
The number of objects rendered.

◆ GetNumberOfBatchesRendered()

virtual UInt32 Murl::Video::IRenderer::GetNumberOfBatchesRendered ( ) const
pure virtual

Query the number of most recently rendered object batches.

Must be called after EndRendering().

Returns
The number of batches rendered.

◆ CollectStatisticsObjects()

virtual Bool Murl::Video::IRenderer::CollectStatisticsObjects ( Index< const IStatisticsObject * > &  objects) const
pure virtual

Populate a given index with all objects currently present in the renderer.

For this method to successfully return all the present objects, the method IEngineConfiguration::SetExtendedObjectStatisticsEnabled(true) must be called in the app's Configure() method.

Parameters
objectsAn index to receive all the present objects.
Returns
true if successful.

◆ AcquireIndexBufferId()

virtual SInt32 Murl::Video::IRenderer::AcquireIndexBufferId ( const String indexBufferName)
pure virtual

Acquire a unique integer ID from a given index buffer name.

Parameters
indexBufferNameThe name of the index buffer.
Returns
The unique index buffer ID.

◆ AcquireVertexBufferId()

virtual SInt32 Murl::Video::IRenderer::AcquireVertexBufferId ( const String vertexBufferName)
pure virtual

Acquire a unique integer ID from a given vertex buffer name.

Parameters
vertexBufferNameThe name of the vertex buffer.
Returns
The unique vertex buffer ID.

◆ AcquireConstantBufferId()

virtual SInt32 Murl::Video::IRenderer::AcquireConstantBufferId ( const String constantBufferName)
pure virtual

Acquire a unique integer ID from a given constant buffer name.

Parameters
constantBufferNameThe name of the constant buffer.
Returns
The unique constant buffer ID.

◆ AcquireUniformId()

virtual SInt32 Murl::Video::IRenderer::AcquireUniformId ( const String uniformName)
pure virtual

Acquire a unique integer ID from a given uniform variable name.

Parameters
uniformNameThe name of the uniform variable.
Returns
The unique uniform variable ID.

◆ AcquireAttributeId()

virtual SInt32 Murl::Video::IRenderer::AcquireAttributeId ( const String attributeName)
pure virtual

Acquire a unique integer ID from a given attribute variable name.

Parameters
attributeNameThe name of the attribute variable.
Returns
The unique attribute variable ID.

◆ GetIndexBufferName()

virtual const String& Murl::Video::IRenderer::GetIndexBufferName ( SInt32  id) const
pure virtual

Get the actual name of an index buffer by its unique integer ID.

Parameters
idThe unique integer ID.
Returns
The index buffer name, or an empty string if not found.

◆ GetVertexBufferName()

virtual const String& Murl::Video::IRenderer::GetVertexBufferName ( SInt32  id) const
pure virtual

Get the actual name of an vertex buffer by its unique integer ID.

Parameters
idThe unique integer ID.
Returns
The vertex buffer name, or an empty string if not found.

◆ GetConstantBufferName()

virtual const String& Murl::Video::IRenderer::GetConstantBufferName ( SInt32  id) const
pure virtual

Get the actual name of an constant buffer by its unique integer ID.

Parameters
idThe unique integer ID.
Returns
The constant buffer name, or an empty string if not found.

◆ GetUniformName()

virtual const String& Murl::Video::IRenderer::GetUniformName ( SInt32  id) const
pure virtual

Get the actual name of a uniform variable by its unique integer ID.

Parameters
idThe unique integer ID.
Returns
The uniform variable name, or an empty string if not found.

◆ GetAttributeName()

virtual const String& Murl::Video::IRenderer::GetAttributeName ( SInt32  id) const
pure virtual

Get the actual name of an attribute variable by its unique integer ID.

Parameters
idThe unique integer ID.
Returns
The attribute variable name, or an empty string if not found.

◆ AcquireConstantBufferSignature()

virtual UInt32 Murl::Video::IRenderer::AcquireConstantBufferSignature ( const IConstantBuffer constantBuffer)
pure virtual

Acquire a signature for a given constant buffer object.

Parameters
constantBufferThe constant buffer for which to acquire the signature.
Returns
The signature.

◆ ReleaseConstantBufferSignature()

virtual Bool Murl::Video::IRenderer::ReleaseConstantBufferSignature ( const IConstantBuffer constantBuffer)
pure virtual

Release the signature of a given constant buffer object.

Parameters
constantBufferThe constant buffer for which to release the signature.
Returns
true if successful.

◆ AcquireConstantsSignature()

virtual UInt32 Murl::Video::IRenderer::AcquireConstantsSignature ( const IConstants constants)
pure virtual

Acquire a signature for a given constant buffer group object.

Parameters
constantsThe constant buffer group for which to acquire the signature.
Returns
The signature.

◆ ReleaseConstantsSignature()

virtual Bool Murl::Video::IRenderer::ReleaseConstantsSignature ( const IConstants constants)
pure virtual

Release the signature of a given constant buffer group object.

Parameters
constantsThe constant buffer group for which to release the signature.
Returns
true if successful.

◆ AcquireIndexBufferSignature()

virtual UInt32 Murl::Video::IRenderer::AcquireIndexBufferSignature ( const IIndexBuffer indexBuffer)
pure virtual

Acquire a signature for a given index buffer object.

Parameters
indexBufferThe index buffer for which to acquire the signature.
Returns
The signature.

◆ ReleaseIndexBufferSignature()

virtual Bool Murl::Video::IRenderer::ReleaseIndexBufferSignature ( const IIndexBuffer indexBuffer)
pure virtual

Release the signature of a given index buffer object.

Parameters
indexBufferThe index buffer for which to release the signature.
Returns
true if successful.

◆ AcquireIndicesSignature()

virtual UInt32 Murl::Video::IRenderer::AcquireIndicesSignature ( const IIndices indices)
pure virtual

Acquire a signature for a given index buffer group object.

Parameters
indicesThe index buffer group for which to acquire the signature.
Returns
The signature.

◆ ReleaseIndicesSignature()

virtual Bool Murl::Video::IRenderer::ReleaseIndicesSignature ( const IIndices indices)
pure virtual

Release the signature of a given index buffer group object.

Parameters
indicesThe index buffer group for which to release the signature.
Returns
true if successful.

◆ AcquireVertexBufferSignature()

virtual UInt32 Murl::Video::IRenderer::AcquireVertexBufferSignature ( const IVertexBuffer vertexBuffer)
pure virtual

Acquire a signature for a given vertex buffer object.

Parameters
vertexBufferThe vertex buffer for which to acquire the signature.
Returns
The signature.

◆ ReleaseVertexBufferSignature()

virtual Bool Murl::Video::IRenderer::ReleaseVertexBufferSignature ( const IVertexBuffer vertexBuffer)
pure virtual

Release the signature of a given vertex buffer object.

Parameters
vertexBufferThe vertex buffer for which to release the signature.
Returns
true if successful.

◆ AcquireVerticesSignature()

virtual UInt32 Murl::Video::IRenderer::AcquireVerticesSignature ( const IVertices vertices)
pure virtual

Acquire a signature for a given vertex buffer group object.

Parameters
verticesThe vertex buffer group for which to acquire the signature.
Returns
The signature.

◆ ReleaseVerticesSignature()

virtual Bool Murl::Video::IRenderer::ReleaseVerticesSignature ( const IVertices vertices)
pure virtual

Release the signature of a given vertex buffer group object.

Parameters
verticesThe vertex buffer group for which to release the signature.
Returns
true if successful.

◆ IncreaseNumberOfResourceBytesAllocated()

virtual void Murl::Video::IRenderer::IncreaseNumberOfResourceBytesAllocated ( IEnums::MemoryType  memoryType,
UInt64  numBytes 
)
pure virtual

Increase the internal number of allocated resource bytes.

Called by an object whenever it allocates a new memory resource.

Parameters
memoryTypeThe type of memory.
numBytesThe number of newly allocated bytes.

◆ DecreaseNumberOfResourceBytesAllocated()

virtual void Murl::Video::IRenderer::DecreaseNumberOfResourceBytesAllocated ( IEnums::MemoryType  memoryType,
UInt64  numBytes 
)
pure virtual

Decrease the internal number of allocated resource bytes.

Called by an object whenever it releases a memory resource.

Parameters
memoryTypeThe type of memory.
numBytesThe number of freed bytes.

◆ IncreaseNumberOfObjectsSuspended()

virtual void Murl::Video::IRenderer::IncreaseNumberOfObjectsSuspended ( )
pure virtual

Increase the internal suspended object count by 1.

Called by an object entering the suspended state.

◆ DecreaseNumberOfObjectsSuspended()

virtual void Murl::Video::IRenderer::DecreaseNumberOfObjectsSuspended ( )
pure virtual

Decrease the internal suspended object count by 1.

Called by an object leaving the suspended state.

◆ ValidateFrameBufferFormat()

virtual Bool Murl::Video::IRenderer::ValidateFrameBufferFormat ( IEnums::PixelFormat colorPixelFormat,
IEnums::DepthBufferFormat depthBufferFormat,
IEnums::StencilBufferFormat stencilBufferFormat 
)
pure virtual

Validate a frame buffer format.

Parameters
colorPixelFormatThe color buffer pixel format to check.
depthBufferFormatThe depth buffer format to check.
stencilBufferFormatThe stencil buffer format to check.
Returns
true if the given buffer format combination represents a valid frame buffer format.

◆ TakeScreenshot()

virtual Bool Murl::Video::IRenderer::TakeScreenshot ( IVideoStream outputStream,
IEnums::Orientation  windowOrientation 
)
pure virtual

Take a screenshot.

Parameters
outputStreamThe video stream receiving the current screen shot.
windowOrientationThe window orientation.
Returns
true if successful.

◆ WaitDeviceIdle()

virtual Bool Murl::Video::IRenderer::WaitDeviceIdle ( )
pure virtual

waits until device is idle

Returns
true if successful

The documentation for this interface was generated from the following file:
  • murl_video_i_renderer.h


Copyright © 2011-2024 Spraylight GmbH.