libdonut  2.3.2
Application framework for cross-platform game development in C++20
Classes | Public Member Functions | List of all members
donut::graphics::RenderPass Class Reference

Graphics drawing queue for batch rendering using a Renderer. More...

#include <donut/graphics/RenderPass.hpp>

Public Member Functions

 RenderPass () noexcept=default
 Construct an empty RenderPass. More...
 
 RenderPass (std::span< std::byte > initialMemory) noexcept
 Construct an empty RenderPass with some initial storage pre-allocated. More...
 
RenderPassdraw (const ModelInstance &model)
 Enqueue a ModelInstance to be drawn when the render pass is rendered. More...
 
RenderPassdraw (const QuadInstance &quad)
 Enqueue a QuadInstance to be drawn when the render pass is rendered. More...
 
RenderPassdraw (const TextureInstance &texture)
 Enqueue a TextureInstance to be drawn when the render pass is rendered. More...
 
RenderPassdraw (const RectangleInstance &rectangle)
 Enqueue a RectangleInstance to be drawn when the render pass is rendered. More...
 
RenderPassdraw (const SpriteInstance &sprite)
 Enqueue a SpriteInstance to be drawn when the render pass is rendered. More...
 
RenderPassdraw (const TextInstance &text)
 Enqueue a TextInstance to be drawn when the render pass is rendered. More...
 
RenderPassdraw (const TextCopyInstance &text)
 Enqueue a TextCopyInstance to be drawn when the render pass is rendered. More...
 
RenderPassdraw (const TextUTF8StringInstance &text)
 Enqueue a TextUTF8StringInstance to be drawn when the render pass is rendered. More...
 
RenderPassdraw (const TextStringInstance &text)
 Enqueue a TextStringInstance to be drawn when the render pass is rendered. More...
 

Detailed Description

Graphics drawing queue for batch rendering using a Renderer.

Examples
example_game.cpp, and example_rectangle.cpp.

Constructor & Destructor Documentation

◆ RenderPass() [1/2]

donut::graphics::RenderPass::RenderPass ( )
defaultnoexcept

Construct an empty RenderPass.

◆ RenderPass() [2/2]

donut::graphics::RenderPass::RenderPass ( std::span< std::byte >  initialMemory)
inlinenoexcept

Construct an empty RenderPass with some initial storage pre-allocated.

Parameters
initialMemorynon-owning view over a contiguous chunk of available memory that the RenderPass may use as temporary storage.
Warning
The pointed-to memory must remain valid until the RenderPass has been destroyed.

Member Function Documentation

◆ draw() [1/9]

RenderPass& donut::graphics::RenderPass::draw ( const ModelInstance model)

Enqueue a ModelInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
ModelInstance
Examples
example_game.cpp, and example_rectangle.cpp.

◆ draw() [2/9]

RenderPass& donut::graphics::RenderPass::draw ( const QuadInstance quad)

Enqueue a QuadInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
QuadInstance

◆ draw() [3/9]

RenderPass& donut::graphics::RenderPass::draw ( const TextureInstance texture)

Enqueue a TextureInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
TextureInstance

◆ draw() [4/9]

RenderPass& donut::graphics::RenderPass::draw ( const RectangleInstance rectangle)

Enqueue a RectangleInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
RectangleInstance

◆ draw() [5/9]

RenderPass& donut::graphics::RenderPass::draw ( const SpriteInstance sprite)

Enqueue a SpriteInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
SpriteInstance

◆ draw() [6/9]

RenderPass& donut::graphics::RenderPass::draw ( const TextInstance text)

Enqueue a TextInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
TextInstance

◆ draw() [7/9]

RenderPass& donut::graphics::RenderPass::draw ( const TextCopyInstance text)

Enqueue a TextCopyInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
TextCopyInstance

◆ draw() [8/9]

RenderPass& donut::graphics::RenderPass::draw ( const TextUTF8StringInstance text)

Enqueue a TextUTF8StringInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
TextUTF8StringInstance

◆ draw() [9/9]

RenderPass& donut::graphics::RenderPass::draw ( const TextStringInstance text)

Enqueue a TextStringInstance to be drawn when the render pass is rendered.

Returns
*this, for chaining.
Exceptions
std::bad_allocon allocation failure.
See also
TextStringInstance

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