// CSQC_UpdateView - Called every rendered frame on the client. Useful for HUD drawing operations. void CSQC_UpdateView(float vwidth, float vheight) { R_ClearScene();// ALWAYS Clear Current Scene First // Assign Standard Viewflags R_SetView(VF_DRAWWORLD, 1);// Draw the World (and sky) - this MUST be set to 1! R_SetView(VF_DRAWCROSSHAIR, 1);// Draw the Crosshair R_SetView(VF_DRAWENGINESBAR, 0);//Don't draw Quake status bar // Setup Entities to be Rendered (include all base types; normal, engine and viewmodels) View_UpdateEveryFrame(); R_SetView(VF_ORIGIN, CSQC_VIEW); R_AddEntities(MASK_ENGINE | MASK_ENGINEVIEWMODELS | MASK_NORMAL ); // Render the Scene R_RenderScene(); GUI_HudDraw(); }
void FGLRenderer::CreateScene() { // reset the portal manager GLPortal::StartFrame(); PO_LinkToSubsectors(); ProcessAll.Clock(); // clip the scene and fill the drawlists for(unsigned i=0;i<portals.Size(); i++) portals[i]->glportal = NULL; gl_spriteindex=0; Bsp.Clock(); GLRenderer->mVBO->Map(); R_SetView(); validcount++; // used for processing sidedefs only once by the renderer. gl_RenderBSPNode (nodes + numnodes - 1); if (GLRenderer->mCurrentPortal != NULL) GLRenderer->mCurrentPortal->RenderAttached(); Bsp.Unclock(); // And now the crappy hacks that have to be done to avoid rendering anomalies: gl_drawinfo->HandleMissingTextures(); // Missing upper/lower textures gl_drawinfo->HandleHackedSubsectors(); // open sector hacks for deep water gl_drawinfo->ProcessSectorStacks(); // merge visplanes of sector stacks GLRenderer->mVBO->Unmap(); ProcessAll.Unclock(); }