Embedded texture extraction.

Caches textures to disk for shape formats that support embedded textures.
Only the compressed texture codepath has been tested. There are a large number of binary gltf files with embedded (and pbr) textures for testing here: https://github.com/KhronosGroup/glTF-Sample-Models
This commit is contained in:
OTHGMars 2019-04-21 23:59:40 -04:00
parent 73cb9343d2
commit 0859b29fa1
2 changed files with 61 additions and 2 deletions

View file

@ -26,6 +26,7 @@
#ifndef _TSSHAPELOADER_H_
#include "ts/loader/tsShapeLoader.h"
#endif
#include <assimp/texture.h>
//-----------------------------------------------------------------------------
class AssimpShapeLoader : public TSShapeLoader
@ -37,6 +38,7 @@ protected:
virtual bool ignoreNode(const String& name);
void detectDetails();
void extractTexture(U32 index, aiTexture* pTex);
public:
AssimpShapeLoader();