Hi guys,
I'm coding this fullscreen managed DirectDraw app. I use the standard flipping principle with a front and a back buffer. Now I want to draw some surfaces onto the back buffer, but clip them off the edges of the back buffer. This doesn't seem to work and gets me an UnsupportedException from DirectDraw. The next example works fine:
In the above example SomeSurface gets clipped the way its supposed to be. Here comes the problem code:
This gets me the UnsupportedException from DirectDraw. The only difference to both pieces of code is in the X and Y values of the drawn Surface. I just dont get it . Im sure you guys can help me out . Thanks in advance.
I'm coding this fullscreen managed DirectDraw app. I use the standard flipping principle with a front and a back buffer. Now I want to draw some surfaces onto the back buffer, but clip them off the edges of the back buffer. This doesn't seem to work and gets me an UnsupportedException from DirectDraw. The next example works fine:
Visual Basic:
BackBuffer.Clipper = New Clipper()
BackBuffer.Clipper.ClipList = New Rectangle() {New Rectangle(10, 10, 100, 100)}
BackBuffer.Draw(New Rectangle(1, 1, 32, 32), SomeSurface, DrawFlags.DoNotWait)
In the above example SomeSurface gets clipped the way its supposed to be. Here comes the problem code:
Visual Basic:
BackBuffer.Clipper = New Clipper()
BackBuffer.Clipper.ClipList = New Rectangle() {New Rectangle(10, 10, 100, 100)}
BackBuffer.Draw(New Rectangle(0, 0, 32, 32), SomeSurface, DrawFlags.DoNotWait)
This gets me the UnsupportedException from DirectDraw. The only difference to both pieces of code is in the X and Y values of the drawn Surface. I just dont get it . Im sure you guys can help me out . Thanks in advance.