• ### Announcements

#### Archived

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

# HEEEEELP!!! with setting up clippers!

## Recommended Posts

I use this piece of code:

//Create a clipper, and attach it to the back_buffer

directDraw->CreateClipper(0,&clipper,NULL);
clip_rect.top = 0;
clip_rect.left = 0;
clip_rect.right = 640;
clip_rect.bottom = 480;

memcpy(region_data->Buffer, &clip_rect, sizeof(clip_rect));
region_data->rdh.iType =			RDH_RECTANGLES;
region_data->rdh.nCount =			1;
region_data->rdh.nRgnSize =			sizeof(RECT);
region_data->rdh.rcBound.top =		0;
region_data->rdh.rcBound.left =		0;
region_data->rdh.rcBound.right =	640;
region_data->rdh.rcBound.bottom =	480;

clipper->SetClipList(region_data, 0);
back_buffer->SetClipper(clipper);

free(region_data);
//Clipper set up, and attached to back_buffer


and I get a black empty screen when I run the program, before I used the clipper, it worked perfect, please help! It''s nice to be important, but it''s more important to be nice. [edited by - Bad_Maniac on October 19, 2002 9:58:02 AM]

##### Share on other sites
Aaah, allright...
I have to use Blt instead of Bltfast. then it works like a charm...

I thought that you would still be able to use bltfast even with a clipper attached, and it would simply ignore the clipper. But that doesn''t seem to be the case. is that so, Or am I missing something?

##### Share on other sites
You cannot use BltFast if a clipper is attached. The SDK´s help saids so.

• ### Forum Statistics

• Total Topics
627736
• Total Posts
2978869

• 10
• 10
• 21
• 14
• 12