Nebula
Loading...
Searching...
No Matches
instancerendererbase.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11//------------------------------------------------------------------------------
12#include "core/refcounted.h"
13#include "math/matrix44.h"
14#include "coregraphics/shaderstate.h"
15#include "coregraphics/shader.h"
16namespace Base
17{
61
62//------------------------------------------------------------------------------
65inline void
71
72//------------------------------------------------------------------------------
75inline const Ptr<CoreGraphics::Shader>&
77{
78 return this->shader;
79}
80
81} // namespace Instancing
82//------------------------------------------------------------------------------
Definition instancerendererbase.h:19
Util::Array< Math::matrix44 > modelTransforms
Definition instancerendererbase.h:54
bool isOpen
Definition instancerendererbase.h:59
const Ptr< CoreGraphics::Shader > & GetShader() const
gets the shader instance
Definition instancerendererbase.h:76
void BeginUpdate(SizeT amount)
begins transform updates, clears transform array
Definition instancerendererbase.cc:63
void SetShader(const Ptr< CoreGraphics::Shader > &shader)
sets the shader instance
Definition instancerendererbase.h:66
void AddId(const int id)
add id
Definition instancerendererbase.cc:91
Util::Array< Math::matrix44 > modelViewProjectionTransforms
Definition instancerendererbase.h:56
__DeclareClass(InstanceRendererBase)
void EndUpdate()
ends transform updates
Definition instancerendererbase.cc:103
void Close()
close rendered
Definition instancerendererbase.cc:53
InstanceRendererBase()
constructor
Definition instancerendererbase.cc:19
Util::Array< Math::matrix44 > modelViewTransforms
Definition instancerendererbase.h:55
Util::Array< int > objectIds
Definition instancerendererbase.h:57
void SetInstanceMultiplier(SizeT multiplier)
set instancing render multiplier
void Setup()
setup renderer
Definition instancerendererbase.cc:43
void AddTransform(const Math::matrix44 &matrix)
adds transform
Definition instancerendererbase.cc:81
bool inBeginUpdate
Definition instancerendererbase.h:58
Ptr< CoreGraphics::Shader > shader
Definition instancerendererbase.h:53
virtual void Render(const SizeT multiplier)
render instances
Definition instancerendererbase.cc:130
virtual ~InstanceRendererBase()
destructor
Definition instancerendererbase.cc:30
The common base class of Nebula.
Definition refcounted.h:38
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
bool isvalid() const
check if pointer is valid
Definition ptr.h:435
Nebula's dynamic array class.
Definition array.h:60
#define n_assert(exp)
Definition debug.h:50
Definition gamecontentserverbase.cc:10
A shader represents an entire shader resource, containing several stages and programs.
int SizeT
Definition types.h:49