Added support for compressed x files (all files from dx sdk, except car2.x, work, no further tests yet).
Added a working makefile for mingw, provides more configs now. Not perfect yet. Added decompression part of zlib (inflate). Moved IrrXML to ./contrib dir. Moved some IRR/IRRmesh shared code. FIXME: makefile for gnu/linux is untested yet. Code cleanup. Unified #ifndef ASSIMP_BUILD_nnn_IMPORTER directives. OBJ loader supports map_bump, map_ka, map_ks, map_ns now. Endianess conversion in the ply loader is correct now. Changed IRR/IRRMESH coordinate system conversion. Not absolutely right now, but better than before. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@305 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -40,13 +40,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "AssimpPCH.h"
|
||||
#ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER
|
||||
|
||||
#include "ObjFileImporter.h"
|
||||
#include "ObjFileParser.h"
|
||||
#include "ObjFileData.h"
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
namespace Assimp {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
using namespace std;
|
||||
@@ -441,6 +441,18 @@ void ObjFileImporter::createMaterial(const ObjFile::Model* pModel, const ObjFile
|
||||
// Adding textures
|
||||
if ( 0 != pCurrentMaterial->texture.length )
|
||||
mat->AddProperty( &pCurrentMaterial->texture, AI_MATKEY_TEXTURE_DIFFUSE(0));
|
||||
|
||||
if ( 0 != pCurrentMaterial->textureAmbient.length )
|
||||
mat->AddProperty( &pCurrentMaterial->textureAmbient, AI_MATKEY_TEXTURE_AMBIENT(0));
|
||||
|
||||
if ( 0 != pCurrentMaterial->textureSpecular.length )
|
||||
mat->AddProperty( &pCurrentMaterial->textureSpecular, AI_MATKEY_TEXTURE_SPECULAR(0));
|
||||
|
||||
if ( 0 != pCurrentMaterial->textureBump.length )
|
||||
mat->AddProperty( &pCurrentMaterial->textureBump, AI_MATKEY_TEXTURE_HEIGHT(0));
|
||||
|
||||
if ( 0 != pCurrentMaterial->textureSpecularity.length )
|
||||
mat->AddProperty( &pCurrentMaterial->textureSpecularity, AI_MATKEY_TEXTURE_SHININESS(0));
|
||||
|
||||
// Store material property info in material array in scene
|
||||
pScene->mMaterials[ pScene->mNumMaterials ] = mat;
|
||||
@@ -489,3 +501,5 @@ void ObjFileImporter::appendChildToParentNode(aiNode *pParent, aiNode *pChild)
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
} // Namespace Assimp
|
||||
|
||||
#endif // !! ASSIMP_BUILD_NO_OBJ_IMPORTER
|
||||
|
||||
Reference in New Issue
Block a user