HRESULT RenderWin32DX9Imp::s_displayReset( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext ) { ::OutputDebugStr( L"RenderWin32DX9Imp::s_displayReset()\n" ); RenderWin32DX9Imp * const render = (RenderWin32DX9Imp*) pUserContext; const RECT rc = DXUTGetWindowClientRect(); render->getBufferFactory()->displayReset( NULL, rc.left, rc.top, pBackBufferSurfaceDesc->Width, pBackBufferSurfaceDesc->Height ); render->eventListener_->displayReset( render->getBufferFactory(), rc.left, rc.top, pBackBufferSurfaceDesc->Width, pBackBufferSurfaceDesc->Height ); return S_OK; }
void Camera::Resize() { RECT rect = DXUTGetWindowClientRect(); float fAspectRatio = (FLOAT)rect.right / (FLOAT)rect.bottom; D3DXVECTOR4 modelInView; D3DXVec3Transform(&modelInView, &m_vModelCenter, &m_mView); SetProjParams( D3DX_PI/4, fAspectRatio, max(0.1f, modelInView.z-(m_fMaxRadius*2)) , modelInView.z+(m_fMaxRadius*2) ); SetWindow( rect.right, rect.bottom ); }
void Debug::Print() { m_str.Append(_T("\n")); m_str.Append(m_retainStr); RECT rcScreen = DXUTGetWindowClientRect(); RECT rc; //SetRect(&rc, 8, 8, 8, 8); SetRect(&rc,rcScreen.right - 300, 8, 8, 8); m_pFont->DrawText(NULL, m_str, m_str.GetLength(), &rc, DT_LEFT | DT_TOP | DT_NOCLIP, D3DCOLOR_XRGB(0, 255, 255)); /*if (GetAsyncKeyState('M') & 0x0001) { ShowMessageBox(); }*/ }