Archived

This topic is now archived and is closed to further replies.

Bill Cosby

wasting time by using the lock function?

Recommended Posts

hi everybody, well, I have a question, it''s about the "Lock" function of Direct3DSurface and the time it takes. I wrote a font engine which locks and unlocks a surface each time a character is about to be printed, but I read that locking surfaces too many times costs a lot of time, so I guess it''s the wrong way, am I right? is it that much important? thanks in advance for(;P("\n"),R--;P("|"))for(e=C;e--;P("_")+(*u++/8)%2))P("| "+(*u/4)%2);

Share this post


Link to post
Share on other sites
Isn''t it better to lock the surface, draw all characters, then unlock it at once, than to lock the surface for every character? Lock is an expensive operation (although I''ve only programmed in old DD I assume the same principles apply to DXG8).

Share this post


Link to post
Share on other sites
My quests for the search for an API that doesn't require locking still hasn't completed
I wonder why it's so difficult to draw a pixel, even my HP48GX calculator can do it better.

[edited by - Lode on July 28, 2002 9:05:18 AM]

Share this post


Link to post
Share on other sites