void CEndGameState::Render() { IW_CALLSTACK("CEndGameState::Render"); IwGxClear(IW_GX_COLOUR_BUFFER_F | IW_GX_DEPTH_BUFFER_F); GetWorld().Render(); IwGxLightingOff(); IwGxSetScreenSpaceOrg( &CIwSVec2::g_Zero ); CIwColour* cols = IW_GX_ALLOC(CIwColour, 4); memset(cols, 255, sizeof(CIwColour) * 4 ); if (GetWorld().GetUICar()->GetPosition() == 1 ) { CIwMaterial* mat = (CIwMaterial *)IwGetResManager()->GetGroupNamed("ui")->GetResNamed("youwin", IW_GX_RESTYPE_MATERIAL); IwGxSetMaterial(mat); } else { CIwMaterial* mat = (CIwMaterial *)IwGetResManager()->GetGroupNamed("ui")->GetResNamed("youlose", IW_GX_RESTYPE_MATERIAL); IwGxSetMaterial(mat); } const uint32 imageWidth = 128; const uint32 imageHeight = 32; CIwSVec2 XY( (int16)((IwGxGetScreenWidth()/2) - (imageWidth/2)), (int16)(IwGxGetScreenHeight()/4) ), dXY( (int16)imageWidth, (int16)imageHeight ); IwGxDrawRectScreenSpace(&XY, &dXY, cols); IwGxLightingOn(); IwGxFlush(); IwGxSwapBuffers(); #ifdef IW_DEBUG // Reset metrics for next frame IwGxMetricsReset(); #endif }
void CRenderer::Begin() { s3eDeviceYield(0); IwGxLightingOff(); //IwGxLightingAmbient(true); IwGxSetScreenSpaceOrg( &CIwSVec2::g_Zero ); //IwGxSetScreenSpaceSlot( 0 ); //IwGxLightingDiffuse( false ); IwGxClear(IW_GX_COLOUR_BUFFER_F | IW_GX_DEPTH_BUFFER_F); if (mIsResetDeviceparam) { mIsResetDeviceparam = false; UpdateDeviceParams(); if ( mOnResetparams != NULL ) { mOnResetparams(); } } ResetBuffers(); }