Ok, So I'm new to DirectDraw. Been working a lot with GapiDraw (for PocketPC) previously. With Gapi you can use DrawFast on a surface with negative values if you've set a clipper to the surface, but when I use negative X and Y coords for the DDraw DrawFast it's a crash and burn. How do I get around this?
Example:
private void InizializeDirectDraw() {
[indent]...
device = new Device();
...
primarySurface = new Surface( desc, device );
...
clipper = new Clipper( device );
clipper.Window = this;
primarySurface.Clipper = clipper;
...
// draw a new blue (default it seems) bitmap
imageSurface = new Surface( new Bitmap(100,100), desc, device );
[/indent]
}
// called every 30 ms from a timer
private void Render() {
[indent]...
[color=Red]secondarySurface.DrawFast( 0, 0, imageSurface, DrawFastFlags.Wait );[/color]
...
[/indent]
}
Now... If I change the secondarySurface.DrawFast(0, 0, imageSurface, DrawFastFlasgs.Wait); to say; secondarySurface.DrawFast(-10, -10, imageSurface, DrawFastFlasgs.Wait); then the program crashes on rendering the surface.
How do I get around this? Is there a problem with the clipper?
I'm happy for ANY help or suggestions. It seems hard to believe that noone has every drawn anything off the left of the screen, but I can't find any information on it at all. :(
Thanks!