Method SetViewport( x,y,w,h )
If x=0 And y=0 And w=GraphicsWidth() And h=GraphicsHeight()
glDisable GL_SCISSOR_TEST
Else
glEnable GL_SCISSOR_TEST
glScissor x,GraphicsHeight()-y-h,w,h
EndIf
End Method
If x=0 And y=0 And w=GraphicsWidth() And h=GraphicsHeight()
glDisable GL_SCISSOR_TEST
Else
glEnable GL_SCISSOR_TEST
glScissor x,GraphicsHeight()-y-h,w,h
EndIf
End Method