//------------------------------------------------------------------;
//
//------------------------------------------------------------------;

void c_render::m_render ( void ) {

   e_d3d->l_d3d_device->Clear                ( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,
                                               D3DCOLOR_COLORVALUE(0.0f,0.0f,0.0f,1.0f), 1.0f, 0 );

   e_d3d->l_d3d_device->BeginScene           ();

   e_d3d->l_d3d_device->SetTexture           ( 0, e_d3d->l_aniso_lookup );
   e_d3d->l_d3d_device->SetIndices           ( e_d3d->l_index_buffer );
   e_d3d->l_d3d_device->SetStreamSource      ( 0, e_d3d->l_vertex_buffer, 0, sizeof( e_v->v_6 ) );

   e_fx->m_set_fx();

   e_d3d->l_d3d_device->SetVertexDeclaration ( e_d3d->l_vertex_declare );
   cgD3D9BindProgram                         ( e_d3d->l_cg_program );

   // render

   for( unsigned long i = 0; i < e_d3d->l_num_sections; i++ ) {
      e_d3d->l_d3d_device->DrawIndexedPrimitive( D3DPT_TRIANGLELIST, 0,
      e_d3d->l_attributes[i].VertexStart,
      e_d3d->l_attributes[i].VertexCount,
      e_d3d->l_attributes[i].FaceStart * 3,
      e_d3d->l_attributes[i].FaceCount );
   }

   e_d3d->l_d3d_device->EndScene ();
   e_d3d->l_d3d_device->Present  ( NULL, NULL, NULL, NULL );

}
