Move MeshReader into filamesh namespace.

This class will not extend well to glTF so this cordons it off into the
filamesh namespace, which is an already-existing namespace that we use
for the things related to the filamesh file format.

For glTF we might create a new library with its own MeshReader so
this will mitigate confusion.
This commit is contained in:
prideout
2019-02-06 12:59:48 -08:00
committed by Philip Rideout
parent 4b0f1e8247
commit 72a987057e
7 changed files with 15 additions and 3 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ using namespace math;
struct App {
Material* material;
MaterialInstance* materialInstance;
MeshReader::Mesh mesh;
filamesh::MeshReader::Mesh mesh;
mat4f transform;
Texture* albedo;
Texture* normal;
@@ -111,8 +111,8 @@ int main(int argc, char** argv) {
ibl->setRotation(mat3f::rotate(0.5f, float3{ 0, 1, 0 }));
// Add geometry into the scene.
app.mesh = MeshReader::loadMeshFromBuffer(engine, RESOURCES_SUZANNE_DATA, nullptr, nullptr,
app.materialInstance);
app.mesh = filamesh::MeshReader::loadMeshFromBuffer(engine, RESOURCES_SUZANNE_DATA, nullptr,
nullptr, app.materialInstance);
auto ti = tcm.getInstance(app.mesh.renderable);
app.transform = mat4f{ mat3f(1), float3(0, 0, -4) } * tcm.getWorldTransform(ti);
rcm.setCastShadows(rcm.getInstance(app.mesh.renderable), false);