NAP
Public Member Functions | Public Attributes | List of all members
EmptyMesh Class Reference

#include <emptymesh.h>

Public Member Functions

 EmptyMesh (Core &core)
 
virtual bool init (utility::ErrorState &errorState) override
 
virtual MeshInstancegetMeshInstance () override
 
virtual const MeshInstancegetMeshInstance () const override
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

EMemoryUsage mUsage = EMemoryUsage::Static
 Property: 'Usage' GPU memory usage. More...
 
EDrawMode mDrawMode = EDrawMode::Triangles
 Property: 'DrawMode' The draw mode that should be used to draw the shapes. More...
 
ECullMode mCullMode = ECullMode::Back
 Property: 'CullMode' The triangle cull mode to use. More...
 
EPolygonMode mPolygonMode = EPolygonMode::Fill
 Property: 'PolygonMode' The polygon mode to use, fill is always available and should be the default. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Resource to generate a mesh instance without buffers. For simple rendering pipelines that rely on shader programs only. A common use case for this is rendering a full-screen color or texture using a single triangle. The nap::RenderFaderComponent is set up this way and serves as a good example.

The following command invokes the vertex shader three times to render a single triangle. Logic for positioning the points is inside the vertex shader.

vkCmdDraw(commandBuffer, 3, 1, 0, 0);
Inheritance diagram for EmptyMesh:
[legend]
Collaboration diagram for EmptyMesh:
[legend]

Constructor & Destructor Documentation

◆ EmptyMesh()

EmptyMesh ( Core core)

Member Function Documentation

◆ getMeshInstance() [1/2]

virtual const MeshInstance& getMeshInstance ( ) const
overridevirtual
Returns
MeshInstance as created during init().

Implements IMesh.

◆ getMeshInstance() [2/2]

virtual MeshInstance& getMeshInstance ( )
overridevirtual
Returns
MeshInstance as created during init().

Implements IMesh.

◆ init()

virtual bool init ( utility::ErrorState errorState)
overridevirtual

Initialize this dummy mesh

Reimplemented from Object.

Member Data Documentation

◆ mCullMode

Property: 'CullMode' The triangle cull mode to use.

◆ mDrawMode

Property: 'DrawMode' The draw mode that should be used to draw the shapes.

◆ mPolygonMode

Property: 'PolygonMode' The polygon mode to use, fill is always available and should be the default.

◆ mUsage

Property: 'Usage' GPU memory usage.