for(int row=150;row<=250;row+=50) { for(int col=0;col<=600;col+=200) { count++; if(count>=1 && count<=4) { RECT rect; rect.left=col; rect.right=col+200; rect.top=row-50; rect.bottom=row; //draw surface to the backbuffer d3ddev->StretchRect(surface, NULL, backbuffer, &rect, D3DTEXF_NONE); } if(count>=5 && count<=8) { RECT rect; rect.left=col; rect.right=col+200; rect.top=row-50; rect.bottom=row; //draw surface to the backbuffer d3ddev->StretchRect(surface_two, NULL, backbuffer, &rect, D3DTEXF_NONE); } if(count>=9 && count<=12) { RECT rect; rect.left=col; rect.right=col+200; rect.top=row-50; rect.bottom=row; //draw surface to the backbuffer d3ddev->StretchRect(surface_three, NULL, backbuffer, &rect, D3DTEXF_NONE); } } }
it has something to do where I put the array in the program.I notice when I attempt to draw the bricks they are drawn properly they just stay on the screen.