Original Post
🔒 Locked
Present
Advertisement
look in tutorials of sdk
Since the tutorials in the SDK don't implement the source rect and destination rect features of Present(), I'll elaborate a little further.
Specifying a source rectangle will tell D3D to only present that specific part of the rendered back buffer to the screen. Here is an example:

Dustin Franklin
Mircrosoft DirectX MVP
[edited by - circlesoft on March 7, 2004 10:59:17 AM]
Specifying a source rectangle will tell D3D to only present that specific part of the rendered back buffer to the screen. Here is an example:
RECT sourceRectangle;Hope this helps you out
// Top left corner of rectangle is at (0,0)
sourceRectangle.left = 0;
sourceRectangle.top = 0;
// Bottom right corner of rectangle is at (200, 300)
sourceRectangle.right = 200;
sourceRectangle.bottom = 300;
d3dDevice->Present( sourceRectangle, NULL, NULL, NULL );

Dustin Franklin
Mircrosoft DirectX MVP
[edited by - circlesoft on March 7, 2004 10:59:17 AM]
It would be advisable for you to have a firm grasp on C++ before you really get into DirectX. DirectX is tough enough as it is, so you really should be proficient with C++ first.
Some decent looking C++ intro sites (from a quick search on google):
Here
Here
Very Good
To answer your question flat-out, you''re getting that error because Present() wants sourceRectangle as a pointer. Change it to:
d3dDevice->Present( &sourceRectangle, NULL, NULL, NULL );
Some decent looking C++ intro sites (from a quick search on google):
Here
Here
Very Good
To answer your question flat-out, you''re getting that error because Present() wants sourceRectangle as a pointer. Change it to:
d3dDevice->Present( &sourceRectangle, NULL, NULL, NULL );
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement