DLL speed of Gamma Controls

Started by
0 comments, last by cliffski 24 years, 2 months ago
Heres something strange: I have routines wrapped up in a class that use the DirectDraw SetGammaRamp() function to do a nice fade in/out from black. These work very nicely thankyou, and were fast enough (so fast i had to stall them to stop you missing the whole effect in fact). Now i have pushed my wrapper out into a DLL and call the functions through a DLL it is MUCH slower on this machine (havent tried on others). ALL that has changed is that the code now sits in an external DLL, which hasnt affected the blitting speed (blitter now also in a DLL). Does code slow down if accessed through a DLL? or do i have a problem specific to video drivers/gamma controls. Im using DX6 and Visual C++. Thanks in advance http://www.positech.co.uk
Advertisement
Hola.

I don''t think it''s the DLL. Once I wrote a program where all my graphics were DLLs that hand-drew the sprites (instead of blitting, or whatever you like). It ran as fast as when I had them in real memory. If I''m not mistaken, the only speed difference with DLLS is the load time, and whatever time waste you incur by using a pointer to a function instead of a direct address. There might be some windows (ugh) overhead, as it watches to see if the DLL can possibly be freed or not, but I''m not sure.

Anyway, I used DLLs for some VERY time-critical routines, and didn''t even lose one millisecond on my render time. This was before I started using directdraw, though, so if there''s overhead there, it could be fouling it. Also, if you''re low on memory, I believe it executes the DLL off of disk, loading it each time, and that would kill performance very nicely.




-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto

This topic is closed to new replies.

Advertisement