Alright, so I'm writing a code parser just for fun. And everything seems to be working fine except a couple things, and I've pinpointed the cause of one of them to this portion of code:
Case "i" ;initiate graphics
Graphics Gw,Gh,Gx,Gy
SetBuffer BackBuffer()
Color Gr,Gg,Gb
Cls
Flip -1
If debug DebugLog "Graphics initiated"
That sets my graphics mode when the command is given. But when another, drawing, command is instructed, for example:
Case "r" ;rect
Rect Gx,Gy,Gw,Gh,Gf
It gives me the error "Invalid Blitz2D Buffer Handle". It does Cls and Flip -1 completely fine, though. What might be my issue here?
|