Skip to content

Commit

Permalink
MeshViewer accepts arguments - first arg to specify model file path
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentz committed Feb 19, 2019
1 parent ea2e033 commit 8f20b3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file modified samples/MeshViewer/resources/cinder_app_icon.ico
Binary file not shown.
7 changes: 7 additions & 0 deletions samples/MeshViewer/src/MeshViewerApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ struct FlythroughCamera : public CameraPersp
});
}
};

struct MeshViewerApp : public App
{
CameraPersp mCam;
Expand Down Expand Up @@ -203,6 +204,12 @@ struct MeshViewerApp : public App
mCamUi = CameraUi(&mCam, getWindow(), -1);

mMeshFilenames = listGlTFFiles();
auto& args = getCommandLineArgs();
if (args.size() == 2)
{
MESH_FILE_ID = mMeshFilenames.size();
mMeshFilenames.push_back(args[1]);
}
#ifndef CINDER_COCOA_TOUCH
auto params = createConfigUI({400, 500});
ADD_ENUM_TO_INT(params.get(), MESH_FILE_ID, mMeshFilenames);
Expand Down

0 comments on commit 8f20b3b

Please sign in to comment.