Having problems with the polygon command. Run the following code, and then uncomment the polygon statement and run again.
#constant COLOR_RED = D3D_RGBA( 255, 0, 0, 255 )
#constant COLOR_GREEN = D3D_RGBA( 0, 255, 0, 255 )
#constant COLOR_BLUE = D3D_RGBA( 0, 0, 255, 255 )
#constant COLOR_PINK = D3D_RGBA( 255, 0, 255, 255 )
#constant COLOR_YELLOW = D3D_RGBA( 255, 255, 0, 255 )
sync on
D3D_Init
do
cls 0
d3d_box 0, 0, screen width()/2, screen height(), COLOR_BLUE, COLOR_PINK, COLOR_RED, COLOR_YELLOW
d3d_box screen width()/2, 0, screen width(), screen height(), COLOR_BLUE, COLOR_PINK, COLOR_RED, COLOR_YELLOW
`D3D_POLYGON screen width()/2, screen height()/2, 100, 4, 1, 0, COLOR_GREEN
sync
loop
For me at least, the first time I run i get my screen split in half down the middle, and a colored gradient on each side.
After uncommenting the polygon (which BTW should be a green diamond in the dead center of the screen), I get a green diamond in the dead center of the screen with no gradients at all.
Now, this isn't how I discovered the problem, but I decided to try to pin down the problem to avoid posting thousands of lines of code.
What did happen was that once I put a diamond in my code, half of my boxes stopped working.
I tested this with a version of d3d_func dated may 2008. I updated to the october 30 version with the same results.