Class CommandBuffer

Class Documentation

class CommandBuffer

A structure for usage by the GPU manager to invoke a set of GPU commands.

Public Functions

inline virtual void DrawMesh(std::shared_ptr<Mesh> mesh, std::shared_ptr<Material> material, Transform transform)

Draw a mesh using a material.

Parameters:
  • mesh – The mesh to draw

  • material – The material to draw the mesh with

  • transform – The transform to position the mesh

Throws:
  • NonexistentValueException – If either the mesh or material handles are empty

  • BadBakeStateException – If the mesh is not baked

  • BadBakeStateException – If the shader backing the material is not baked

inline virtual ~CommandBuffer()

Public Static Functions

static std::unique_ptr<CommandBuffer> Create()

Create a new empty command buffer.

Protected Functions

inline CommandBuffer()
inline virtual void Execute()
inline virtual bool SetupContext(bool rendering = false)
inline virtual void StartRendering(glm::vec3 clearColor)
inline virtual void EndRendering()
inline virtual void UpdateEngineData(std::shared_ptr<Camera> cam, bool worldRefresh)

Friends

friend class GPUManager
friend class PALModule