Has anyone had any luck with the Lock method on the DirectDraw Surface object?
Every time I lock a surface, application just freezes and eventually throws an exception, I have tried everything, cant seem to get it to work properly.
Has anyone had any luck with the Lock method on the DirectDraw Surface object?
Every time I lock a surface, application just freezes and eventually throws an exception, I have tried everything, cant seem to get it to work properly.
I think the Lock() method is just crap to be honest. I have it working, but the bigger surface you lock, the longer the lock takes to begin. I am guessing this has something to do with mapping to an array in .NET. But either way, it makes the method pretty useless for any realtime effects. Which is pretty much what it is there for.
if you need a quick access to memory is impossible, memory acces is show
if you need simple modification use pixel shader in direct3D. If you use 2.0 version you can obtain many effect but you cant do what ever you want.
In directDraw this is the best you can do
Just thought Id mention that you can use D3D to create 2D stuff (not to mention you get better performance AND its easier to use). Theres a Sprite class in D3D that makes this all too easy.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.