Dim oRect As Rectangle = New Rectangle(Left, Top, Width, Height)
Dim oTmpSurf As Surface = oDevice.GetRenderTarget(0)
oDevice.ColorFill(oTmpSurf, oRect, System.Drawing.Color.FromArgb(255, 64, 128, 192))
Color fill is not working
VB.NET using DX9.
I have the following code:
The code breaks on Colorfill saying that I have an invalid call... any ideas why? I checked oTmpSurf in the debugger and it is coming back as a Default pool object.
Thanks in advance.
Have you tried running your application with the debug runtimes? they are usually pretty good at giving you good information as to what/why things are exploding [grin]
Have a look at the link in my signiture if you haven't used the debug runtimes before...
hth
Jack
Have a look at the link in my signiture if you haven't used the debug runtimes before...
hth
Jack
No, found the problem. When I went to check the surface I was writing a message to your reply (thanks for the reply btw). The surface was 608x800 or something like that because I was running in windowed mode. The rectangle defined an area beyond those dimensions... namely 100x100 for x,y and 600x600 for width and height.
So... got that fixed.
So... got that fixed.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement