void CCS580HWView::OnDraw(CDC* pDC) { CCS580HWDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here if(m_pApplication != NULL) DrawFrameBuffer(pDC); }
void GameManager::Draw() { //MODELS Matrix objpos; Matrix worldviewproj; // clear the screen. glClearColor( 0.0f, 0.0f, 0.5f, 0.0f ); glClearDepth( 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); // setup our camera //gCamera->GetViewProjection()->SetLookAtRH( *gCamera->Position(), Vector3(0,1,0), Vector3(0,0,0)); gCamera->GetViewProjection()->Multiply(gCamera->GetPerspective()); glBindFramebuffer( GL_FRAMEBUFFER, m_pFBO->m_FBOHandle ); glViewport( 0, 0, m_pFBO->m_Width, m_pFBO->m_Height ); // draw mesh { glClearColor( 0.23f, 0.34f, 0.74f, 0.0f ); glClearDepth( 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); objpos.SetIdentity(); objpos.SetPosition( 0,0,0 ); worldviewproj = objpos; worldviewproj.Multiply( gCamera->GetViewProjection() ); mScreenManager->Draw(); } // deactivate the framebuffer. glBindFramebuffer( GL_FRAMEBUFFER, 0 ); glViewport( 0, 0, m_ScreenWidth, m_ScreenHeight ); glBindTexture( GL_TEXTURE_2D, m_pFBO->m_TextureHandle ); DrawFrameBuffer(); }
void Player::Draw() { DrawFrameBuffer(playerText, position.x, position.y, PLAYER_W, PLAYER_H); }