ngfx::DrawColorOp

Inherits from ngfx::DrawOp

Public Functions

Name
DrawColorOp(GraphicsContext * ctx, const std::vector< glm::vec2 > & pos, const glm::vec4 & color)
virtual ~DrawColorOp()
virtual void draw(CommandBuffer * commandBuffer, Graphics * graphics) override

Protected Functions

Name
virtual void createPipeline()

Public Attributes

Name
std::unique_ptr< Buffer > bPos
std::unique_ptr< Buffer > bUbo

Protected Attributes

Name
GraphicsPipeline * graphicsPipeline
uint32_t B_POS
uint32_t U_UBO
uint32_t numVerts

Additional inherited members

Public Functions inherited from ngfx::DrawOp

Name
DrawOp(GraphicsContext * ctx)
virtual ~DrawOp()

Protected Attributes inherited from ngfx::DrawOp

Name
GraphicsContext * ctx

Public Functions Documentation

function DrawColorOp

DrawColorOp(
    GraphicsContext * ctx,
    const std::vector< glm::vec2 > & pos,
    const glm::vec4 & color
)

function ~DrawColorOp

inline virtual ~DrawColorOp()

function draw

virtual void draw(
    CommandBuffer * commandBuffer,
    Graphics * graphics
) override

Parameters:

  • commandBuffer The command buffer
  • graphics The graphics object

Reimplements: ngfx::DrawOp::draw

Draw function. This function is called when the scene is redrawn. It records the draw calls to the command buffer.

Protected Functions Documentation

function createPipeline

virtual void createPipeline()

Public Attributes Documentation

variable bPos

std::unique_ptr< Buffer > bPos;

variable bUbo

std::unique_ptr< Buffer > bUbo;

Protected Attributes Documentation

variable graphicsPipeline

GraphicsPipeline * graphicsPipeline;

variable B_POS

uint32_t B_POS;

variable U_UBO

uint32_t U_UBO;

variable numVerts

uint32_t numVerts;

Updated on 3 April 2021 at 20:21:51 PDT