Talvos  0.1
SPIR-V interpreter and dynamic analysis framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
talvos::DrawCommandBase Class Referenceabstract

This is an abstract base class for draw commands. More...

#include <talvos/Commands.h>

Inheritance diagram for talvos::DrawCommandBase:
talvos::Command talvos::DrawCommand talvos::DrawIndexedCommand

Public Member Functions

 DrawCommandBase (Type Ty, const PipelineContext &PC, const std::shared_ptr< RenderPassInstance > RPI, uint32_t NumVertices, uint32_t VertexOffset, uint32_t NumInstances, uint32_t InstanceOffset)
 Create a new DrawCommandBase. More...
 
uint32_t getInstanceOffset () const
 Returns the offset of the first instance. More...
 
uint32_t getNumInstances () const
 Returns the number of instances. More...
 
uint32_t getNumVertices () const
 Returns the number of vertices. More...
 
const PipelineContextgetPipelineContext () const
 Returns the pipeline context. More...
 
const RenderPassInstancegetRenderPassInstance () const
 Returns the render pass instance used by this command. More...
 
uint32_t getVertexOffset () const
 Returns the offset of the first vertex. More...
 
void setRenderPassInstance (const std::shared_ptr< RenderPassInstance > RPI)
 Set the render pass instance used by this command. More...
 
- Public Member Functions inherited from talvos::Command
Type getType () const
 Returns the type of this command. More...
 
void run (Device &Dev) const
 Run this command on Dev. More...
 

Protected Member Functions

virtual void runImpl (Device &Dev) const override=0
 Command execution handler. More...
 
- Protected Member Functions inherited from talvos::Command
 Command (Type Ty)
 Used by subclasses to initialize the command type. More...
 

Private Attributes

PipelineContext PC
 The pipeline context. More...
 
std::shared_ptr
< RenderPassInstance
RPI
 The render pass instance. More...
 
uint32_t NumVertices
 Number of vertices. More...
 
uint32_t VertexOffset
 Offset of first vertex. More...
 
uint32_t NumInstances
 Number of instances. More...
 
uint32_t InstanceOffset
 Offset of first instance. More...
 

Additional Inherited Members

- Public Types inherited from talvos::Command
enum  Type {
  BEGIN_RENDER_PASS, BLIT_IMAGE, CLEAR_ATTACHMENT, CLEAR_COLOR_IMAGE,
  COPY_BUFFER, COPY_BUFFER_TO_IMAGE, COPY_IMAGE, COPY_IMAGE_TO_BUFFER,
  DISPATCH, DRAW, DRAW_INDEXED, END_RENDER_PASS,
  FILL_BUFFER, NEXT_SUBPASS, SET_EVENT, RESET_EVENT,
  UPDATE_BUFFER, WAIT_EVENTS
}
 Identifies different Command subclasses. More...
 
- Protected Attributes inherited from talvos::Command
Type Ty
 The type of this command. More...
 

Detailed Description

This is an abstract base class for draw commands.

Definition at line 311 of file Commands.h.

Constructor & Destructor Documentation

talvos::DrawCommandBase::DrawCommandBase ( Type  Ty,
const PipelineContext PC,
const std::shared_ptr< RenderPassInstance RPI,
uint32_t  NumVertices,
uint32_t  VertexOffset,
uint32_t  NumInstances,
uint32_t  InstanceOffset 
)
inline

Create a new DrawCommandBase.

Parameters
PCThe pipeline context used for the draw command.
RPIThe render pass instance to use.
NumVerticesThe number of vertices to draw.
VertexOffsetThe offset of the first vertex.
NumInstancesThe number of instances to draw.
InstanceOffsetThe offset of the first instance.

Definition at line 322 of file Commands.h.

Member Function Documentation

uint32_t talvos::DrawCommandBase::getInstanceOffset ( ) const
inline

Returns the offset of the first instance.

Definition at line 332 of file Commands.h.

uint32_t talvos::DrawCommandBase::getNumInstances ( ) const
inline

Returns the number of instances.

Definition at line 335 of file Commands.h.

uint32_t talvos::DrawCommandBase::getNumVertices ( ) const
inline

Returns the number of vertices.

Definition at line 338 of file Commands.h.

const PipelineContext& talvos::DrawCommandBase::getPipelineContext ( ) const
inline

Returns the pipeline context.

Definition at line 341 of file Commands.h.

const RenderPassInstance& talvos::DrawCommandBase::getRenderPassInstance ( ) const
inline

Returns the render pass instance used by this command.

Definition at line 344 of file Commands.h.

uint32_t talvos::DrawCommandBase::getVertexOffset ( ) const
inline

Returns the offset of the first vertex.

Definition at line 347 of file Commands.h.

virtual void talvos::DrawCommandBase::runImpl ( Device Dev) const
overrideprotectedpure virtual

Command execution handler.

Implements talvos::Command.

Implemented in talvos::DrawIndexedCommand, and talvos::DrawCommand.

void talvos::DrawCommandBase::setRenderPassInstance ( const std::shared_ptr< RenderPassInstance RPI)
inline

Set the render pass instance used by this command.

Definition at line 350 of file Commands.h.

Member Data Documentation

uint32_t talvos::DrawCommandBase::InstanceOffset
private

Offset of first instance.

Definition at line 367 of file Commands.h.

uint32_t talvos::DrawCommandBase::NumInstances
private

Number of instances.

Definition at line 366 of file Commands.h.

uint32_t talvos::DrawCommandBase::NumVertices
private

Number of vertices.

Definition at line 364 of file Commands.h.

PipelineContext talvos::DrawCommandBase::PC
private

The pipeline context.

Definition at line 360 of file Commands.h.

std::shared_ptr<RenderPassInstance> talvos::DrawCommandBase::RPI
private

The render pass instance.

Definition at line 362 of file Commands.h.

uint32_t talvos::DrawCommandBase::VertexOffset
private

Offset of first vertex.

Definition at line 365 of file Commands.h.