Add GLTF loader stub
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
This commit is contained in:
@@ -7,6 +7,7 @@ set(KRAKEN_PRIVATE_HEADERS "${KRAKEN_PRIVATE_HEADERS}" PARENT_SCOPE)
|
|||||||
add_sources(kraken.cpp)
|
add_sources(kraken.cpp)
|
||||||
add_private_headers(KREngine-common.h)
|
add_private_headers(KREngine-common.h)
|
||||||
add_sources(resources/KRResource+blend.cpp)
|
add_sources(resources/KRResource+blend.cpp)
|
||||||
|
add_sources(resources/KRResource+gltf.cpp)
|
||||||
# add_source(resources/KRResource+fbx.cpp) # TODO - Locate FBX SDK dependencies
|
# add_source(resources/KRResource+fbx.cpp) # TODO - Locate FBX SDK dependencies
|
||||||
add_private_headers(resources/KRResource.h)
|
add_private_headers(resources/KRResource.h)
|
||||||
add_source_and_header(KRAudioBuffer)
|
add_source_and_header(KRAudioBuffer)
|
||||||
|
|||||||
@@ -349,6 +349,8 @@ KRResource* KRContext::loadResource(const std::string& file_name, Block* data)
|
|||||||
resource = m_pSoundManager->load(name.c_str(), extension, data);
|
resource = m_pSoundManager->load(name.c_str(), extension, data);
|
||||||
} else if (extension.compare("obj") == 0) {
|
} else if (extension.compare("obj") == 0) {
|
||||||
resource = KRResource::LoadObj(*this, file_name);
|
resource = KRResource::LoadObj(*this, file_name);
|
||||||
|
} else if (extension.compare("gltf") == 0) {
|
||||||
|
resource = KRResource::LoadGltf(*this, file_name);
|
||||||
#if !TARGET_OS_IPHONE
|
#if !TARGET_OS_IPHONE
|
||||||
/*
|
/*
|
||||||
// FINDME, TODO, HACK! - Uncomment
|
// FINDME, TODO, HACK! - Uncomment
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public:
|
|||||||
#if !TARGET_OS_IPHONE
|
#if !TARGET_OS_IPHONE
|
||||||
// static KRScene* LoadFbx(KRContext &context, const std::string& path); TODO, FINDME, HACK! - Uncomment
|
// static KRScene* LoadFbx(KRContext &context, const std::string& path); TODO, FINDME, HACK! - Uncomment
|
||||||
static KRScene* LoadBlenderScene(KRContext& context, const std::string& path);
|
static KRScene* LoadBlenderScene(KRContext& context, const std::string& path);
|
||||||
|
static KRBundle* LoadGltf(KRContext& context, const std::string& path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user