Why is this DX function so SLOW?
Hi, here is what I use to make my animation in my DX game. But it SLOWS down my game a LOT. Does anybody know whats wrong.
THanks.
Private Sub tmrEXP_Timer()
Dim t As Long
t = Timer
Do
DoEvents
Call DD_CreateSurfFromFile(App.Path & "\exp1.bmp", Expanim, BackBufDesc, 36, 42)
Loop Until Timer > t + 0.1
Call DD_CreateSurfFromFile(App.Path & "\exp2.bmp", Expanim, BackBufDesc, 36, 42)
Do
DoEvents
Loop Until Timer > t + 0.2
Call DD_CreateSurfFromFile(App.Path & "\exp3.bmp", Expanim, BackBufDesc, 36, 42)
Do
DoEvents
Loop Until Timer > t + 0.3
Call DD_CreateSurfFromFile(App.Path & "\exp3.bmp", Expanim, BackBufDesc, 36, 42)
Do
DoEvents
Loop Until Timer > t + 0.4
End Sub