Merging r5975 through r6036 from trunk to ogl-es branch.
GLES drivers adapted, but only did make compile-tests. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6038 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
53
source/Irrlicht/CMD3MeshFileLoader.cpp
Normal file
53
source/Irrlicht/CMD3MeshFileLoader.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
#ifdef _IRR_COMPILE_WITH_MD3_LOADER_
|
||||
|
||||
#include "CMD3MeshFileLoader.h"
|
||||
#include "CAnimatedMeshMD3.h"
|
||||
#include "irrString.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
{
|
||||
|
||||
//! Constructor
|
||||
CMD3MeshFileLoader::CMD3MeshFileLoader( scene::ISceneManager* smgr)
|
||||
: SceneManager(smgr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//! destructor
|
||||
CMD3MeshFileLoader::~CMD3MeshFileLoader()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//! returns true if the file maybe is able to be loaded by this class
|
||||
//! based on the file extension (e.g. ".bsp")
|
||||
bool CMD3MeshFileLoader::isALoadableFileExtension(const io::path& filename) const
|
||||
{
|
||||
return core::hasFileExtension ( filename, "md3" );
|
||||
}
|
||||
|
||||
|
||||
IAnimatedMesh* CMD3MeshFileLoader::createMesh(io::IReadFile* file)
|
||||
{
|
||||
CAnimatedMeshMD3 * mesh = new CAnimatedMeshMD3();
|
||||
|
||||
if ( mesh->loadModelFile ( 0, file, SceneManager->getFileSystem(), SceneManager->getVideoDriver() ) )
|
||||
return mesh;
|
||||
|
||||
mesh->drop ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif // _IRR_COMPILE_WITH_MD3_LOADER_
|
Reference in New Issue
Block a user