Page 1 of 1

GetDC() is really slow.

PostPosted: Oct 19, 2009 @ 11:52am
by perrs
As I mentioned in an earlier thread I've been working on rendering text with a Device Context. Everything is working fine now, but it would seem that the GetDC() function is really slow. This wouldn't be a problem if I only had to call it once per frame, but apparently I'm not allowed to blit from the surface before I have released the Device Context. If I try I get an exception with the content "One or more surfaces are locked, preventing operation". This means that I will have to get and release the Device Context each time I need to draw some text, and seeing that this process easily takes about 25 ms this quickly becomes a major problem. Is there any way to blit from a surface without releasing the Device Context? If not, can you think of any other way to make this run faster?

Thanks in advance.

Per Rasmussen.

PostPosted: Oct 22, 2009 @ 6:47pm
by Johan

PostPosted: Oct 24, 2009 @ 4:17pm
by perrs
Hi Johan,

Thank you for your reply. Honestly, I'm afraid the source code license is a bit outside of my budget. Is there no way to do this with the binary license?

Per Rasmussen.

PostPosted: Oct 24, 2009 @ 8:40pm
by Johan
Hi Per,

Can you send me a PM and we'll see how we can resolve this.

Sincerely
Johan