Nebula
Loading...
Searching...
No Matches
Vulkan::VkInstanceRenderer Class Reference

#include <vkinstancerenderer.h>

Inherits Base::InstanceRendererBase.

Public Member Functions

 VkInstanceRenderer ()
 constructor
 
virtual ~VkInstanceRenderer ()
 destructor
 
void Setup ()
 setup renderer
 
void Close ()
 close rendered
 
void Render (const SizeT multiplier)
 render
 
- Public Member Functions inherited from Base::InstanceRendererBase
 InstanceRendererBase ()
 constructor
 
virtual ~InstanceRendererBase ()
 destructor
 
void Setup ()
 setup renderer
 
void Close ()
 close rendered
 
void SetShader (const Ptr< CoreGraphics::Shader > &shader)
 sets the shader instance
 
const Ptr< CoreGraphics::Shader > & GetShader () const
 gets the shader instance
 
void SetInstanceMultiplier (SizeT multiplier)
 set instancing render multiplier
 
void BeginUpdate (SizeT amount)
 begins transform updates, clears transform array
 
void AddTransform (const Math::matrix44 &matrix)
 adds transform
 
void AddId (const int id)
 add id
 
void EndUpdate ()
 ends transform updates
 
- Public Member Functions inherited from Core::RefCounted
 RefCounted ()
 constructor
 
int GetRefCount () const
 get the current refcount
 
void AddRef ()
 increment refcount by one
 
void Release ()
 decrement refcount and destroy object if refcount is zero
 
bool IsInstanceOf (const Rtti &rtti) const
 return true if this object is instance of given class
 
bool IsInstanceOf (const Util::String &className) const
 return true if this object is instance of given class by string
 
bool IsInstanceOf (const Util::FourCC &classFourCC) const
 return true if this object is instance of given class by fourcc
 
bool IsA (const Rtti &rtti) const
 return true if this object is instance of given class, or a derived class
 
bool IsA (const Util::String &rttiName) const
 return true if this object is instance of given class, or a derived class, by string
 
bool IsA (const Util::FourCC &rttiFourCC) const
 return true if this object is instance of given class, or a derived class, by fourcc
 
const Util::StringGetClassName () const
 get the class name
 
Util::FourCC GetClassFourCC () const
 get the class FourCC code
 

Private Member Functions

 __DeclareClass (VkInstanceRenderer)
 

Private Attributes

Ptr< CoreGraphics::ShaderState > shaderState
 
Ptr< CoreGraphics::ConstantBufferinstancingBuffer
 
Ptr< CoreGraphics::ShaderVariable > instancingBlockVar
 
Ptr< CoreGraphics::ShaderVariable > modelArrayVar
 
Ptr< CoreGraphics::ShaderVariable > modelViewArrayVar
 
Ptr< CoreGraphics::ShaderVariable > modelViewProjectionArrayVar
 
Ptr< CoreGraphics::ShaderVariable > idArrayVar
 

Static Private Attributes

static const int MaxInstancesPerBatch = 256
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::RefCounted
static void DumpRefCountingLeaks ()
 dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!)
 
- Protected Member Functions inherited from Core::RefCounted
virtual ~RefCounted ()
 destructor (called when refcount reaches zero)
 
- Protected Attributes inherited from Base::InstanceRendererBase
Ptr< CoreGraphics::Shader > shader
 
Util::Array< Math::matrix44 > modelTransforms
 
Util::Array< Math::matrix44 > modelViewTransforms
 
Util::Array< Math::matrix44 > modelViewProjectionTransforms
 
Util::Array< int > objectIds
 
bool inBeginUpdate
 
bool isOpen
 

Constructor & Destructor Documentation

◆ VkInstanceRenderer()

Vulkan::VkInstanceRenderer::VkInstanceRenderer ( )

constructor

◆ ~VkInstanceRenderer()

Vulkan::VkInstanceRenderer::~VkInstanceRenderer ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Vulkan::VkInstanceRenderer::__DeclareClass ( VkInstanceRenderer )
private

◆ Close()

void Vulkan::VkInstanceRenderer::Close ( )

close rendered

◆ Render()

void Vulkan::VkInstanceRenderer::Render ( const SizeT multiplier)
virtual

render

Reimplemented from Base::InstanceRendererBase.

◆ Setup()

void Vulkan::VkInstanceRenderer::Setup ( )

setup renderer

Member Data Documentation

◆ idArrayVar

Ptr<CoreGraphics::ShaderVariable> Vulkan::VkInstanceRenderer::idArrayVar
private

◆ instancingBlockVar

Ptr<CoreGraphics::ShaderVariable> Vulkan::VkInstanceRenderer::instancingBlockVar
private

◆ instancingBuffer

Ptr<CoreGraphics::ConstantBuffer> Vulkan::VkInstanceRenderer::instancingBuffer
private

◆ MaxInstancesPerBatch

const int Vulkan::VkInstanceRenderer::MaxInstancesPerBatch = 256
staticprivate

◆ modelArrayVar

Ptr<CoreGraphics::ShaderVariable> Vulkan::VkInstanceRenderer::modelArrayVar
private

◆ modelViewArrayVar

Ptr<CoreGraphics::ShaderVariable> Vulkan::VkInstanceRenderer::modelViewArrayVar
private

◆ modelViewProjectionArrayVar

Ptr<CoreGraphics::ShaderVariable> Vulkan::VkInstanceRenderer::modelViewProjectionArrayVar
private

◆ shaderState

Ptr<CoreGraphics::ShaderState> Vulkan::VkInstanceRenderer::shaderState
private

The documentation for this class was generated from the following files: