im trying to get a bitmap image of a bucket for this simple "bomb catching" game to render on screen but its not working. Im using a function to draw the surface onto the backbuffer. I think the main problem im having is with StretchRect. The rectangles are confusing me i guess and i cant seem to figure out how to render the image in the right coordinates and how to scale it down to size. Here's the code is use to draw the surface to screen
void DrawSurface(LPDIRECT3DSURFACE9 source, LPDIRECT3DSURFACE9 dest, float x, float y)
{
D3DSURFACE_DESC desc;
source -> GetDesc(&desc);
RECT source_rect = {0, 0, desc.Width, desc.Height};
RECT dest_rect = {x, y, x + desc.Width, y + desc.Height};
device -> StretchRect(source, &source_rect, dest, &dest_rect, D3DTEXF_NONE);
}
any help? I know it probably has to do something with my rectangles lol