Over 10 Million Study Resources Now at Your Fingertips

Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Pages: 2

Retrieve the back buffer call the getbackbuffer method idirect ddevice


Chapter 2: Starting DirectX — Your First Program

NOTE. Here are some important rules to remember when surface copying:
• The source surface must have been created with

• The source and dest rects must fit within the surface.

• No stretching or shrinking is allowed (the rects must be the same size).

HRESULT GetBackBuffer
UINT iSwapChain,
UINT BackBuffer,

Chapter 2: Starting DirectX — Your First Program

UINT BackBuffer
[in] Index of the back buffer object to return. Back buffers are numbered from 0 to the total number of back buffers minus one.

Chapter 2

A value of 0 returns the first back buffer. For the purposes of this book, pass 0.

The code to get the back buffer and copy a surface onto it might look like the following. Be sure to copy your surface onto the back buffer between the BeginScene and EndScene statements of the rendering loop, which occurs on each frame. This will ensure your data gets copied onto the back buffer correctly and that it’ll be visi-ble as the frame is presented.

//Draw stuff here
IDirect3DSurface9 *BackBuffer = NULL;
g_pd3dDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, & BackBuffer); g_pd3dDevice->UpdateSurface(SourceSurface, NULL, BackBuffer, NULL);

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Make payment
Document download
Download File
PageId: ELIB2D187C
Uploaded by :
Page 1 Preview
retrieve the back buffer call the getbackbuffer me
Sell Your Old Documents & Earn Wallet Balance