void RenderingManagerC::update() { // Clear the backbuffer to a blue color g_pd3dDevice->Clear( 0L, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER|D3DCLEAR_STENCIL, D3DCOLOR_XRGB(0,0,255), 1.0f, 0L ); // Begin the scene g_pd3dDevice->BeginScene(); DrawBackground(); DrawPlayer(); DrawRaycast(); DrawPortal(true); DrawPortal(false); DrawCrossHair(); //DrawBox(71.0f, 673.0f, 1218.0f, 673.0f, 0x00000000, 0xFFFFFFFF); DrawStaticObjects(); DrawTurrents(); // End the scene g_pd3dDevice->EndScene(); // Present the backbuffer contents to the display g_pd3dDevice->Present( NULL, NULL, NULL, NULL ); }
static void DrawTree_r(node_t * node) { int s; portal_t *p, *nextp; winding_t *w; if(node->planenum != PLANENUM_LEAF) { DrawTree_r(node->children[0]); DrawTree_r(node->children[1]); return; } // draw all the portals for(p = node->portals; p; p = p->next[s]) { w = p->winding; s = (p->nodes[1] == node); if(w) // && p->nodes[0] == node) { if(Portal_Passable(p)) continue; DrawPortal(p, node->areaportal); } } }