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:
37
tests/meshLoaders.cpp
Normal file
37
tests/meshLoaders.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2008-2012 Colin MacDonald
|
||||
// No rights reserved: this software is in the public domain.
|
||||
|
||||
#include "testUtils.h"
|
||||
|
||||
using namespace irr;
|
||||
|
||||
// Tests mesh loading features and the mesh cache.
|
||||
/** This won't test render results. Currently, not all mesh loaders are tested. */
|
||||
bool meshLoaders(void)
|
||||
{
|
||||
IrrlichtDevice *device = createDevice(video::EDT_NULL, core::dimension2d<u32>(160, 120), 32);
|
||||
assert_log(device);
|
||||
if (!device)
|
||||
return false;
|
||||
|
||||
scene::ISceneManager * smgr = device->getSceneManager();
|
||||
scene::IAnimatedMesh* mesh = smgr->getMesh("../media/ninja.b3d");
|
||||
assert_log(mesh);
|
||||
|
||||
bool result = (mesh != 0);
|
||||
|
||||
if (mesh)
|
||||
{
|
||||
if (mesh != smgr->getMesh("../media/ninja.b3d"))
|
||||
{
|
||||
logTestString("Loading from same file results in different meshes!");
|
||||
result=false;
|
||||
}
|
||||
}
|
||||
|
||||
device->closeDevice();
|
||||
device->run();
|
||||
device->drop();
|
||||
|
||||
return result;
|
||||
}
|
Reference in New Issue
Block a user