Skip to content
Permalink
Browse files

Linux prj files and fixes.

  • Loading branch information...
PetrosKataras committed Aug 30, 2016
1 parent ab2d708 commit df3762da9a4822d92dbda0f8da6212f76e730050
@@ -0,0 +1,30 @@
if( NOT TARGET gltf )

get_filename_component( gltf_SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../src" ABSOLUTE )
get_filename_component( CINDER_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../.." ABSOLUTE )

list( APPEND gltf_SOURCES
"${gltf_SOURCE_PATH}/cinder/Skeleton.cpp"
"${gltf_SOURCE_PATH}/cinder/gltf/Types.cpp"
"${gltf_SOURCE_PATH}/cinder/gltf/SimpleScene.cpp"
"${gltf_SOURCE_PATH}/cinder/gltf/MeshLoader.cpp"
"${gltf_SOURCE_PATH}/cinder/gltf/File.cpp" )

add_library( gltf "${gltf_SOURCES}" )

target_include_directories( gltf PUBLIC "${gltf_SOURCE_PATH}"
)
target_include_directories( gltf PRIVATE BEFORE "${CINDER_PATH}/include" )

target_compile_options( gltf PRIVATE "-std=c++11" )

if( NOT TARGET cinder )
include( "${CINDER_PATH}/proj/cmake/configure.cmake" )
find_package( cinder REQUIRED PATHS
"${CINDER_PATH}/${CINDER_LIB_DIRECTORY}"
"$ENV{CINDER_PATH}/${CINDER_LIB_DIRECTORY}" )
endif()

target_link_libraries( gltf PRIVATE cinder )

endif()
@@ -0,0 +1,15 @@
cmake_minimum_required( VERSION 3.0 FATAL_ERROR )
set( CMAKE_VERBOSE_MAKEFILE ON )

project( BasicAnimation )

get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.." ABSOLUTE )
get_filename_component( SAMPLE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE )

include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" )

ci_make_app(
SOURCES ${SAMPLE_DIR}/src/BasicAnimationApp.cpp
CINDER_PATH ${CINDER_PATH}
BLOCKS gltf
)
@@ -0,0 +1,15 @@
cmake_minimum_required( VERSION 3.0 FATAL_ERROR )
set( CMAKE_VERBOSE_MAKEFILE ON )

project( BasicLoading )

get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.." ABSOLUTE )
get_filename_component( SAMPLE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE )

include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" )

ci_make_app(
SOURCES ${SAMPLE_DIR}/src/BasicLoadingApp.cpp
CINDER_PATH ${CINDER_PATH}
BLOCKS gltf
)
@@ -0,0 +1,15 @@
cmake_minimum_required( VERSION 3.0 FATAL_ERROR )
set( CMAKE_VERBOSE_MAKEFILE ON )

project( SkeletalAnimation )

get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.." ABSOLUTE )
get_filename_component( SAMPLE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE )

include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" )

ci_make_app(
SOURCES ${SAMPLE_DIR}/src/SkeletalAnimationApp.cpp
CINDER_PATH ${CINDER_PATH}
BLOCKS gltf
)
@@ -61,9 +61,9 @@ void SkeletalAnimationApp::setup()
.vertex( loadAsset( "skeletal.vert" ) )
.fragment( loadAsset( "skeletal.frag" ) ) );

gltf.emplace_back( fs::path( "monster" ) / "glTF" / "monster.gltf", "monster" );
gltf.emplace_back( fs::path( "monster" ) / "glTF" / "Monster.gltf", "monster" );
gltf.emplace_back( fs::path( "CesiumMan" ) / "glTF" / "Cesium_Man.gltf", "Cesium_Man" );
gltf.emplace_back( fs::path( "brainsteam" ) / "glTF" / "brainsteam.gltf", "Figure_2_node" );
gltf.emplace_back( fs::path( "brainsteam" ) / "glTF" / "Brainsteam.gltf", "Figure_2_node" );

auto &initial = gltf[0];
loadFromFile( initial.first, initial.second );
@@ -8,6 +8,7 @@

#include "SimpleScene.h"
#include "cinder/gltf/MeshLoader.h"
#include "cinder/app/App.h"

using namespace std;

@@ -180,8 +181,8 @@ Node::Node( const gltf::Node *node, simple::Scene::Node *parent, Scene *scene )
mTransformIndex = mScene->setupTransform( parentIndex, modelMatrix );

// cache the children
for ( auto &node : node->children )
mChildren.emplace_back( Node::create( node, this, scene ) );
for ( auto &children : node->children )
mChildren.emplace_back( Node::create( children, this, scene ) );

// check if there's meshes
if( node->hasMeshes() ) {
@@ -331,4 +332,4 @@ Scene::CameraInfo& Scene::CameraInfo::operator=( CameraInfo &&info ) noexcept
}


}}}
}}}

0 comments on commit df3762d

Please sign in to comment.
You can’t perform that action at this time.