void CApp::FrameMove() { #ifdef WIN32 if( pGetInput()->bKeyDown( DIK_ESCAPE ) ) PostQuitMessage( 0 ); #endif if( iGetFrameIdent() % 12 == 0 ) { #ifdef __amigaos4__ static #endif char szCaption[256]; sprintf( szCaption, "Antialiased procedural checkerboard, FPS: %3.1f", fGetFPS() ); #ifdef WIN32 SetWindowText( hGetWindowHandle(), szCaption ); #endif #ifdef LINUX_X11 SDL_SetWindowTitle( pWindow(), szCaption ); #endif #ifdef __amigaos4__ IIntuition->SetWindowTitles( hGetWindowHandle(), szCaption, szCaption ); #endif } }
void CApp::FrameMove() { #ifdef WIN32 if( pGetInput()->bKeyDown( DIK_ESCAPE ) ) PostQuitMessage( 0 ); #endif if( iGetFrameIdent() % 12 == 0 ) { #ifdef __amigaos4__ static #endif char szCaption[256]; sprintf( szCaption, "Volumetric map visualization, FPS: %3.1f", fGetFPS() ); #ifdef WIN32 SetWindowText( hGetWindowHandle(), szCaption ); #endif #ifdef LINUX_X11 XStoreName( (Display *)pGetDisplay(), hGetWindowHandle(), szCaption ); #endif #ifdef __amigaos4__ IIntuition->SetWindowTitles( hGetWindowHandle(), szCaption, szCaption ); #endif } }
void CApp::FrameMove() { #ifdef WIN32 if( pGetInput()->bKeyDown( DIK_ESCAPE ) ) PostQuitMessage( 0 ); #endif if( iGetFrameIdent() % 12 == 0 ) { #ifdef __amigaos4__ static #endif char szCaption[256]; sprintf( szCaption, "Crystal, FPS: %3.1f", fGetFPS() ); #ifdef WIN32 SetWindowText( hGetWindowHandle(), szCaption ); #endif #ifdef LINUX_X11 XStoreName( (Display *)pGetDisplay(), hGetWindowHandle(), szCaption ); #endif #ifdef __amigaos4__ IIntuition->SetWindowTitles( hGetWindowHandle(), szCaption, szCaption ); #endif } if( pGetInput()->bButtonDown( 0 ) ) { // rotate camera around the bubble static float32 fRotX = 0.0f, fRotY = 0.0f; int32 iDeltaX, iDeltaY; pGetInput()->GetMovement( &iDeltaX, &iDeltaY ); fRotX += -0.5f * iDeltaX * fGetInvFPS(); fRotY += 0.5f * iDeltaY * fGetInvFPS(); const float32 fCamPosX = -750.0f * sinf( fRotX ); const float32 fCamPosY = -300.0f * sinf( fRotY ); const float32 fCamPosZ = -750.0f * cosf( fRotX ); m_pCamera->SetPosition( vector3( fCamPosX, fCamPosY, fCamPosZ ) ); m_pCamera->SetLookAt( vector3( 0, 0, 0 ), vector3( 0, 1, 0 ) ); m_pCamera->CalculateView(); } }