• Advertisement

Archived

This topic is now archived and is closed to further replies.

direct x8 backbuffer ques

This topic is 6010 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im a little unclear as to the details of the backbuffer. Can i acquire it once in the initialization code (and reacquire if its lost) and then refer to that pointer in each frame render? I ask because it I did that and I can either lock it and manipulate it or use functions like CopyRects(), but not at the same time(ie the screen is blank), alos when i use clear() and CopyRects() I get the same thing. Am I missing something? here is the code more or less /****** In gameInit ****/ // Set the backbuffer m_pDevice->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, &m_pBackSurface ) // In render function m_pDevice->Clear(0,0, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB( 0, 0, 0), 0.0f, 0); m_pDevice->CopyRects( m_pBackGround, 0, 0, m_pEngine2D->m_pBackSurface, 0 ); m_E2D->m_pDevice->Present (NULL, NULL, NULL, NULL); thanx

Share this post


Link to post
Share on other sites
Advertisement
I should also not that this works in XRGB but not in ARGB, so how do the alpha biths come into play?

Share this post


Link to post
Share on other sites

  • Advertisement