void ConfirmExit(bool p_Silent) { if (p_Silent) return; printf("\nPress any key to exit...\n"); // Wait for keypress WaitForKeypress(); }
//----------------------------------------------------------------------------- // main application //----------------------------------------------------------------------------- int CMaterialSystemTestApp::Main() { if ( !SetMode() ) return 0; CMatRenderContextPtr pRenderContext( g_pMaterialSystem ); // Sets up a full-screen viewport int w, h; pRenderContext->GetWindowSize( w, h ); pRenderContext->Viewport( 0, 0, w, h ); pRenderContext->DepthRange( 0.0f, 1.0f ); // Clears the screen g_pMaterialSystem->BeginFrame( 0 ); pRenderContext->ClearColor4ub( 76, 88, 68, 255 ); pRenderContext->ClearBuffers( true, true ); g_pMaterialSystem->EndFrame(); g_pMaterialSystem->SwapBuffers(); SetWindowText( m_HWnd, "Buffer clearing . . hit a key" ); if ( !WaitForKeypress() ) return 1; SetWindowText( m_HWnd, "Dynamic buffer test.. hit a key" ); TestDynamicBuffers( pRenderContext, false ); if ( !WaitForKeypress() ) return 1; SetWindowText( m_HWnd, "Buffered dynamic buffer test.. hit a key" ); TestDynamicBuffers( pRenderContext, true ); if ( !WaitForKeypress() ) return 1; return 1; }