NAP
emptymesh.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // External Includes
8 #include <mesh.h>
9 
10 namespace nap
11 {
12  // Forward Declares
13  class RenderService;
14 
27  class NAPAPI EmptyMesh : public IMesh
28  {
29  RTTI_ENABLE(IMesh)
30  public:
31  EmptyMesh(Core& core);
32 
36  virtual bool init(utility::ErrorState& errorState) override;
37 
41  virtual MeshInstance& getMeshInstance() override { return *mMeshInstance; }
42 
46  virtual const MeshInstance& getMeshInstance() const override { return *mMeshInstance; }
47 
50  ECullMode mCullMode = ECullMode::Back;
52 
53  private:
54  nap::RenderService* mRenderService = nullptr;
55  std::unique_ptr<MeshInstance> mMeshInstance;
56  };
57 }
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:394
nap::RenderService
Definition: renderservice.h:275
nap::Core
Definition: core.h:82
nap::EmptyMesh::getMeshInstance
virtual MeshInstance & getMeshInstance() override
Definition: emptymesh.h:41
nap::ECullMode::Back
@ Back
Cull back facing triangles.
nap::EPolygonMode::Fill
@ Fill
Polygons are interpreted and rendered using the specified 'EDrawMode'.
nap::EmptyMesh::getMeshInstance
virtual const MeshInstance & getMeshInstance() const override
Definition: emptymesh.h:46
nap::EDrawMode::Triangles
@ Triangles
Interpret the vertex data as a set of triangles.
nap
Definition: templateapp.h:17
nap::EmptyMesh
Definition: emptymesh.h:27
nap::MeshInstance
Definition: mesh.h:196
nap::EDrawMode
EDrawMode
Definition: mesh.h:28