ent_buffers(ENTITY* ent, var num, var lod, void** ppVerts, void** ppTris, void** ppAttribs);

Returns the vertex, index, and attribute buffer of the entity mesh. The buffers can be used to read or manipulate the entity mesh on a lower level than with ent_setvertex.


ent - model, terrain, or wmb entity pointer, or level_ent for level blocks.
num - number of the terrain chunk or level block, beginning with 0.
lod - number of the lod step for the mesh, 0..3.
ppVerts - Pointer to a D3DVERTEX* pointer that is set to the mesh vertex buffer, or NULL.
ppTris - Pointer to a short* pointer pointer that is set to the mesh triangle buffer, or NULL.
ppAttribs - Pointer to a long* pointer that is set to the mesh attribute buffer, or NULL.


0 when the pointers could not be set, otherwise the number of triangles of the mesh.




A7.79  LC 


Example (lite-C):

D3DVERTEX* vbuffer;
short* ibuffer;
if (ent_buffers(my,0,0,&vbuffer,&ibuffer,NULL)) {
  ... // read information from the buffers

See also:

ent_status, vec_for_mesh, ent_getvertex, ent_getmesh, ent_status

► latest version online