Rendering A MeshBuffer

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
kklouzal
Posts: 343
Joined: Sun Mar 28, 2010 8:14 pm
Location: USA - Arizona

Rendering A MeshBuffer

Post by kklouzal »

Hello! I have a mesh buffer, how would I render that?
Thank you!
Dream Big Or Go Home.
Help Me Help You.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Rendering A MeshBuffer

Post by hendu »

driver->drawMeshBuffer

Please read the docs.
kklouzal
Posts: 343
Joined: Sun Mar 28, 2010 8:14 pm
Location: USA - Arizona

Re: Rendering A MeshBuffer

Post by kklouzal »

Yes but how do I position it, can I redraw the same buffer multiple times, if I'm going to update the vertex data do I need to drop the meshbuffer and make a new one or can I use the same one?
Dream Big Or Go Home.
Help Me Help You.
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: Rendering A MeshBuffer

Post by ent1ty »

Well, you could just check out how the mesh scene node does it: http://sourceforge.net/p/irrlicht/code/ ... e.cpp#l128
Set transforrm, set material, draw - that's all there is
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Rendering A MeshBuffer

Post by hybrid »

That should be also documented in the drawMeshBuffer method. Basically all functions named drawSomething and doing 3d rendering use this same scheme.
Also, adding the meshbuffer to a mesh and adding that to the scene would work and makes many things much simpler.
Post Reply