API Documentation
RenderQueue.h
1 // RenderQueue.h
3 //
5 
6 namespace nkGraphics
7 {
17  {
18  public :
19 
20  // Destructor
24  virtual ~RenderQueue () ;
25 
26  // Getters
37  System* getSystem () const ;
45  bool getRaytraced () const ;
49  bool getHidden () const ;
54  Entity* getEntity (unsigned int index) const ;
58  unsigned int getEntityCount () const ;
65 
66  // Setters
70  virtual void setName (nkMemory::StringView name) ;
77  virtual void setRaytraced (bool value) ;
91  void setHidden (bool value) ;
92 
98  virtual Entity* addEntity () ;
104  virtual void eraseEntity (Entity* ent) ;
108  virtual void clearQueue () ;
109 
110  // Queue baking
120  RenderCommandQueue bakeRenderCommandQueue (Shader* shader = nullptr, bool transparent = false) ;
121 
129  virtual void updateEntityNode (Entity* ent, Node* oldNode) ;
138  virtual void updateEntityRenderInfo (Entity* ent, EntityRenderInfo* oldInfo, EntityRenderInfo* newInfo) ;
149  virtual void updateMesh (Entity* ent, EntityRenderInfoSlot* slot, EntityRenderLodSlot* lod, Mesh* oldMesh, Mesh* newMesh) ;
160  virtual void updateShader (Entity* ent, EntityRenderInfoSlot* slot, EntityRenderLodSlot* lod, Shader* oldShader, Shader* newShader) ;
171  virtual void updateShaderRaytracing (Entity* ent, EntityRenderInfoSlot* slot, EntityRenderLodSlot* lod, Shader* oldShader, Shader* newShader) ;
172 
173  // Import / export
174  virtual void exportClassToTree (nkExport::Node* rootNode) override ;
175  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
176 
177  public :
178 
179  // Statics
187  static nkMemory::UniquePtr<RenderQueue> create (System* system = nullptr) ;
188  } ;
189 }
nkGraphics::RenderQueue::setRaytraced
virtual void setRaytraced(bool value)
nkGraphics::RenderQueue::exportClassToTree
virtual void exportClassToTree(nkExport::Node *rootNode) override
nkGraphics::RenderQueue::setName
virtual void setName(nkMemory::StringView name)
nkGraphics::RenderQueue::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkGraphics::RenderQueue::updateEntityRenderInfo
virtual void updateEntityRenderInfo(Entity *ent, EntityRenderInfo *oldInfo, EntityRenderInfo *newInfo)
nkGraphics::RenderQueue::updateMesh
virtual void updateMesh(Entity *ent, EntityRenderInfoSlot *slot, EntityRenderLodSlot *lod, Mesh *oldMesh, Mesh *newMesh)
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkGraphics::RenderQueue::addEntity
virtual Entity * addEntity()
nkGraphics::RenderQueue::~RenderQueue
virtual ~RenderQueue()
nkGraphics::RenderQueue
A render queue, where all items that have to be rendered are queued.
Definition: RenderQueue.h:17
nkGraphics::EntityRenderInfo
Compiles the render information for an Entity to use within a RenderQueue.
Definition: EntityRenderInfo.h:36
nkGraphics::RenderStrategy
A render strategy, used by a render queue to prepare the render commands.
Definition: RenderStrategy.h:17
nkGraphics::Buffer
A buffer that will reside on the GPU.
Definition: Buffer.h:17
nkGraphics::EntityRenderLodSlot
A LOD slot to potentially draw, within a group slot.
Definition: EntityRenderLodSlot.h:15
nkGraphics::RenderQueue::setRenderStrategy
void setRenderStrategy(RenderStrategy *value)
nkGraphics::RenderQueue::getName
nkMemory::StringView getName() const
nkGraphics::RenderQueue::eraseEntity
virtual void eraseEntity(Entity *ent)
nkGraphics::Shader
A shader class, feeding data to a Program.
Definition: Shader.h:16
nkGraphics::RenderQueue::getAccelerationStructureBuffer
virtual Buffer * getAccelerationStructureBuffer() const
nkGraphics::RenderQueue::getEntityCount
unsigned int getEntityCount() const
nkGraphics::RenderQueue::getHidden
bool getHidden() const
nkGraphics::Entity
An entity in a render queue. It drives the shader and possible graph position for a set of renderable...
Definition: Entity.h:15
nkGraphics::RenderQueue::setHidden
void setHidden(bool value)
nkGraphics::RenderQueue::updateEntityNode
virtual void updateEntityNode(Entity *ent, Node *oldNode)
nkGraphics::RenderCommandQueue
A queue of rendering commands.
Definition: RenderCommandQueue.h:12
nkGraphics::RenderQueue::getRaytraced
bool getRaytraced() const
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkGraphics::RenderQueue::updateShaderRaytracing
virtual void updateShaderRaytracing(Entity *ent, EntityRenderInfoSlot *slot, EntityRenderLodSlot *lod, Shader *oldShader, Shader *newShader)
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkGraphics::RenderQueue::create
static nkMemory::UniquePtr< RenderQueue > create(System *system=nullptr)
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkGraphics::RenderQueue::getEntity
Entity * getEntity(unsigned int index) const
nkGraphics::RenderQueue::clearQueue
virtual void clearQueue()
nkGraphics::EntityRenderInfoSlot
A slot within the render information.
Definition: EntityRenderInfoSlot.h:14
nkGraphics::RenderQueue::updateShader
virtual void updateShader(Entity *ent, EntityRenderInfoSlot *slot, EntityRenderLodSlot *lod, Shader *oldShader, Shader *newShader)
nkGraphics::Node
Represents a node in a scene graph.
Definition: Node.h:16
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::Mesh
Holds information about a mesh. Used as a basis to render 3d models.
Definition: Mesh.h:14
nkGraphics::RenderQueue::getSystem
System * getSystem() const
nkGraphics::RenderQueue::getRenderStrategy
RenderStrategy * getRenderStrategy() const
nkGraphics::RenderQueue::bakeRenderCommandQueue
RenderCommandQueue bakeRenderCommandQueue(Shader *shader=nullptr, bool transparent=false)