PDA

View Full Version : dxdraw.surface.fill



Boris
13-04-2004, 09:36 PM
I have a problem with the dxdraw.surface.fill taking ~10ms of cpu. During that 10ms my threads dont get any time.

What I have tried is to split it in 10rects and put application.processmessages between. But drawwing rects seems to go much slower.

Is there any fast method that gives time to other threads?

At the moment 5% of messages get ignored due to the filling process being bussy, not even to mention the message delay. For me 1% is acceptable.

thx in advance

TheLion
14-04-2004, 09:05 AM
You could try to drawn an emty bitmap, no clue if that's faster or slower! :)

Boris
14-04-2004, 09:30 AM
Heej lion. Hoe oud ben jij?


Off course drawing a bitmap is slower. It makes the problem only worse.

TheLion
14-04-2004, 11:13 AM
20, wordt Zondag 21. :) En jij ?

If speed is such an issue for you, then why do you use DelphiX? DirectX is a lot faster if you talk to it directly another good option would be either SDL or OpenGL (or a combo of GL and SDL).

Besides what are you using your threads for?

Traveler
14-04-2004, 07:43 PM
Lion is right. Don't expect wonders from DelphiX when it comes to speed. It is a great tool, but it has its limits. If you want speed at the level you're talking then openGl or plain directX is probably a better choice.