Geometry rendering order

Software: Away3D 4.x

Avatar
Luca, Sr. Member
Posted: 24 May 2013 07:44 AM   Total Posts: 230

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 ?

   
   
‹‹ Quake Maps

X

Away3D Forum

Member Login

Username

Password

Remember_me



X