ngfx::DrawMeshOp

Inherits from ngfx::DrawOp

Public Classes

Name
struct LightData

Protected Classes

Name
struct UBO_FS_Data
struct UBO_VS_Data

Public Functions

Name
DrawMeshOp(GraphicsContext * ctx, MeshData & meshData)
virtual ~DrawMeshOp()
virtual void draw(CommandBuffer * commandBuffer, Graphics * graphics) override
virtual void update(mat4 & modelView, mat4 & modelViewInverseTranspose, mat4 & modelViewProj, LightData & lightData)

Protected Functions

Name
virtual void createPipeline()

Public Attributes

Name
std::unique_ptr< Buffer > bPos
std::unique_ptr< Buffer > bNormals
std::unique_ptr< Buffer > bFaces
std::unique_ptr< Buffer > bUboVS
std::unique_ptr< Buffer > bUboFS

Protected Attributes

Name
GraphicsPipeline * graphicsPipeline
uint32_t B_POS
uint32_t B_NORMALS
uint32_t U_UBO_VS
uint32_t U_UBO_FS
uint32_t numVerts
uint32_t numNormals
uint32_t numFaces

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 DrawMeshOp

DrawMeshOp(
    GraphicsContext * ctx,
    MeshData & meshData
)

function ~DrawMeshOp

inline virtual ~DrawMeshOp()

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.

function update

virtual void update(
    mat4 & modelView,
    mat4 & modelViewInverseTranspose,
    mat4 & modelViewProj,
    LightData & lightData
)

Protected Functions Documentation

function createPipeline

virtual void createPipeline()

Public Attributes Documentation

variable bPos

std::unique_ptr< Buffer > bPos;

variable bNormals

std::unique_ptr< Buffer > bNormals;

variable bFaces

std::unique_ptr< Buffer > bFaces;

variable bUboVS

std::unique_ptr< Buffer > bUboVS;

variable bUboFS

std::unique_ptr< Buffer > bUboFS;

Protected Attributes Documentation

variable graphicsPipeline

GraphicsPipeline * graphicsPipeline;

variable B_POS

uint32_t B_POS;

variable B_NORMALS

uint32_t B_NORMALS;

variable U_UBO_VS

uint32_t U_UBO_VS;

variable U_UBO_FS

uint32_t U_UBO_FS;

variable numVerts

uint32_t numVerts;

variable numNormals

uint32_t numNormals;

variable numFaces

uint32_t numFaces;

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