Blitzmax rendering overview

Miscellaneous Forums/General Discussion/Blitzmax rendering overview

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.

Well, it cures the lag here. I haven't compared the speed hit though.

You'll need to change Pub.Mod\DirectX.Mod\dd.bmx (line 1659) to: Method GetBltStatus(flags)
'low poly and high fill rate causes the issue, solvable by flushing the driver's
'buffered frames using grab pixmap or locking a buffer with a large speed penalty.
'opengl is unaffected.

'change how many loops you do till you see the lag and not general slowdown
'this will vary from pc to pc

'SetGraphicsDriver GLMax2DDriver()
Graphics 800,600,0,0

AutoMidHandle True
image:TImage = LoadImage("lagimg.png") 'any 32x32 image

Local fix = 0

While Not KeyHit(KEY_ESCAPE)
  Cls
  
  If KeyHit(KEY_SPACE) Then fix = 1 - fix
  
  mx = MouseX()
  my = MouseY() 
  
  SetScale 8,8
  For i = 0 To 1000
    DrawImage image,mx,my
  Next
  
  SetScale 1, 1
  DrawText "Fix = " + fix, 12, 12
  
  Flip 0
  
  If fix
    If TD3D7Max2DDriver(_max2dDriver)
      While DDERR_WASSTILLDRAWING = PrimaryDevice.PrimarySurface.GetBltStatus(DDGBS_ISBLTDONE) ; Wend
    EndIf
  EndIf
Wend
End