|
-
Dec 22nd, 2001, 08:59 PM
#1
Thread Starter
Addicted Member
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
-
Dec 22nd, 2001, 10:32 PM
#2
Good Ol' Platypus
How about loading all the surfaces at the start and then blitting the individual pieces down.
File access is kind of slow (for real-time graphics that is!)
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|