I know that if I want to render a series of geometries with the DirectX libraries, the final geometry is “superimposed” to all the others:
void EntityCube::Render()
{
gD3dDevice->SetMaterial( &m_material );
gD3dDevice->SetTexture(0,NULL);
gD3dDevice->SetStreamSource( 0, m_vb,0, sizeof(CUBEVERTEX) );
gD3dDevice->SetFVF( D3DFVF_CUBEVERTEX );
gD3dDevice->SetIndices( m_ib);
// draw a triangle list using 24 vertices and 12 triangles
gD3dDevice->DrawIndexedPrimitive( D3DPT_TRIANGLELIST,0,0,24,0,12);
gD3dDevice->SetMaterial( &m_material );
gD3dDevice->SetTexture(0,NULL);
gD3dDevice->SetStreamSource( 0, m_vb,0, sizeof(CUBEVERTEX) );
gD3dDevice->SetFVF( D3DFVF_CUBEVERTEX );
gD3dDevice->SetIndices( m_ib);
// draw a triangle list using 24 vertices and 12 triangles
gD3dDevice->DrawIndexedPrimitive( D3DPT_TRIANGLELIST,0,0,24,0,12);
}
So, there a fast way to manage rendering order of the objects with Away3D ?