for(int i = 0; i<4 ; i++)
{
RECT source;
RECT destination;
source.top = 0;
source.bottom = 10;
source.left = i*10;
source.right = i*10 + 10;
destination.top = 100;
destination.bottom = 110;
destination.left = i*10 + 10*i;
destination.right = i*10 + 10*i + 10;
hResult = pd3dDevice->StretchRect( squaresSurface,
&source,
backbuffer,
&destination,
D3DTEXF_NONE );
}
As a starting point, does an image start counting at pixel 0 or 1?
StretchRect(directX) not drawing all pixels?
Well i'm sure its a simple numbers thing that I have overlooked... But I just cant 'see' it in the code..
I'm drawing 4 squares of 10*10 pixels, from a bitmap that is 40 pixels wide, 10 high.
*edit*
forgot to include the actual problem:
the bottom line of pixels is not being drawn .. ie it only seems to be going down to the 9th pixel.
here is the code..
are you trying to draw a small image or a background?
if its a small image, try using the ID3DXSprite Interface
if you havent already, i used that for the smaller images and stretcrect for my backgrounds and menus
if its a small image, try using the ID3DXSprite Interface
if you havent already, i used that for the smaller images and stretcrect for my backgrounds and menus
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement