Page 1 of 1

meshBuffer

Posted: Sun Feb 25, 2007 5:35 am
by lostclimategames
ok, i want to use a mesh that is returned from a different engine (i plan to use irrlicht as the renderer and the other engine for the rest of the stuff) now if i wanted to do this would I just do this?

Code: Select all

irr::scene::SMeshBuffer* meshbuff;
meshbuff.Indices= pMesh; /// mesh from other engine
IAnimatedMesh* mesh = smgr->addMeshBuffer  ( meshbuff);

Posted: Sun Feb 25, 2007 7:14 am
by datamagik
What format is the other mesh in?

Posted: Sun Feb 25, 2007 7:41 am
by lostclimategames
well heres the disscussion on the forum for the other engine i use:
http://www.coniserver.net/ubbthreads/sh ... Post697706

In one of the replys, someone said it was in dx format. im not sure what the difference is, i am a noob when it comes to dx, or opengl, i've just used basic engine commands up till now.

Posted: Sun Feb 25, 2007 8:35 pm
by vitek
Most likely the other engines vertex format is not the same as what Irrlicht uses. You would need to create a mesh buffer of the correct type [SMeshBuffer, SMeshBufferLightMap or SMeshBufferTangents], and then push vertices and indices onto that mesh buffer, being sure to initialize the right fields of each vertex.

Travis