New function: Single Surface Drawing.

BlitzMax Forums/BlitzMax Programming/New function: Single Surface Drawing.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This should work with GL too...
Method Draw(x:Float,y:Float,width:Float,height:Float,frame:Int=0)
  Local DXFrame:TDX7ImageFrame = TDX7ImageFrame(image.frame(0))
  If DXFrame
    DXFrame.setUV(u0[frame],v0[frame],u1[frame],v1[frame])
  Else
    Local GLFrame:TGLImageFrame = TGLImageFrame(image.frame(0))
    GLFrame.u0 = u0[frame]
    GLFrame.u1 = u1[frame]
    GLFrame.v0 = v0[frame]
    GLFrame.v1 = v1[frame]
  EndIf
			
  DrawImageRect(Self.Image,x,y,width,height)
End Method