GRAPHICS: CreateModel in GfxBase

This commit is contained in:
Dries Harnie 2012-12-28 03:59:14 +01:00 committed by Joel Teichroeb
parent 43fcfa765f
commit d97ff82dea
3 changed files with 5 additions and 0 deletions

View File

@ -286,6 +286,7 @@ EMIModel::EMIModel(const Common::String &filename, Common::SeekableReadStream *d
_boneNames = NULL;
loadMesh(data);
g_driver->createEMIModel(this);
}
EMIModel::~EMIModel() {

View File

@ -251,6 +251,9 @@ public:
virtual void createSpecialtyTextures() = 0;
virtual Material *getSpecialtyTexture(int n) { return &_specialty[n]; }
virtual void createEMIModel(EMIModel *model) {}
virtual void createModel(Mesh *mesh) {}
virtual int genBuffer() { return 0; }
virtual void delBuffer(int buffer) {}
virtual void selectBuffer(int buffer) {}

View File

@ -57,6 +57,7 @@ Model::Model(const Common::String &filename, Common::SeekableReadStream *data, C
for (int i = 0; i < _numHierNodes; ++i) {
ModelNode &node = _rootHierNode[i];
if (node._mesh) {
g_driver->createModel(node._mesh);
Mesh &mesh = *node._mesh;
Math::Vector3d p = mesh._matrix.getPosition();
float x = p.x();