1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#include "Managers/BsMeshManager.h"
4#include "BsCoreApplication.h"
5#include "Math/BsVector3.h"
6#include "Mesh/BsMesh.h"
7#include "RenderAPI/BsVertexDataDesc.h"
8
9namespace bs
10{
11 void MeshManager::onStartUp()
12 {
13 SPtr<VertexDataDesc> vertexDesc = bs_shared_ptr_new<VertexDataDesc>();
14 vertexDesc->addVertElem(VET_FLOAT3, VES_POSITION);
15
16 mDummyMeshData = bs_shared_ptr_new<MeshData>(1, 3, vertexDesc);
17
18 auto vecIter = mDummyMeshData->getVec3DataIter(VES_POSITION);
19 vecIter.setValue(Vector3(0, 0, 0));
20
21 auto indices = mDummyMeshData->getIndices32();
22 indices[0] = 0;
23 indices[1] = 0;
24 indices[2] = 0;
25
26 mDummyMesh = Mesh::create(mDummyMeshData);
27 }
28}