NAP
shaderballmesh.h
1 #pragma once
2 
3 // External Includes
4 #include <mesh.h>
5 
6 namespace nap
7 {
19  class NAPAPI ShaderBallMesh : public IMesh
20  {
21  RTTI_ENABLE(IMesh)
22  public:
23  // Constructor
24  ShaderBallMesh(Core& core);
25 
31  virtual bool init(utility::ErrorState& errorState) override;
32 
36  virtual MeshInstance& getMeshInstance() override { assert(mMeshInstance != nullptr); return *mMeshInstance; }
37 
41  virtual const MeshInstance& getMeshInstance() const override { assert(mMeshInstance != nullptr); return *mMeshInstance; }
42 
45  ECullMode mCullMode = ECullMode::Back;
46 
47  private:
48  RenderService* mRenderService = nullptr;
49  std::unique_ptr<MeshInstance> mMeshInstance = nullptr;
50  };
51 }
nap::EMemoryUsage::Static
@ Static
Buffer data is uploaded only once from the CPU to the GPU.
nap::EPolygonMode
EPolygonMode
Definition: mesh.h:55
nap::ECullMode
ECullMode
Definition: mesh.h:43
nap::EMemoryUsage
EMemoryUsage
Definition: gpubuffer.h:41
nap::utility::ErrorState
Definition: errorstate.h:19
nap::IMesh
Definition: mesh.h:401
nap::ShaderBallMesh
Definition: shaderballmesh.h:19
nap::RenderService
Definition: renderservice.h:198
nap::Core
Definition: core.h:82
nap::ECullMode::Back
@ Back
Cull back facing triangles.
nap::EPolygonMode::Fill
@ Fill
Polygons are interpreted and rendered using the specified 'EDrawMode'.
nap::ShaderBallMesh::getMeshInstance
virtual const MeshInstance & getMeshInstance() const override
Definition: shaderballmesh.h:41
nap
Definition: templateapp.h:17
nap::MeshInstance
Definition: mesh.h:196
nap::ShaderBallMesh::getMeshInstance
virtual MeshInstance & getMeshInstance() override
Definition: shaderballmesh.h:36