Jump to content
  • Advertisement

Archived

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

LoreKeeper

DX8 Surface Locking

This topic is 6105 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey... I''ve been recently trying to do a bit of DX8 pixel manipulation, but this seems to be problematic; I''ve done the following: D3DDev8.GetBackBuffer(.., 0, Surface); // gets the surface, works Surface.GetDesc(surfDesc); // works Surface.LockRect(surfRect, nil, 0); // returns an error The surface descriptor says the surface is the current render_target (great) and seems generally right, except that the "size in bytes" is 0. And this although I do 3D renders and font writing to the surface as well. I don''t get it. Help anywhere? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Turn on DEBUG DX and it should give you an error message, unless its crashing. What error does it return (if no crashing) ?

-------
Happy Coding!
Homepage: www.pcwebvia.f2s.com

Share this post


Link to post
Share on other sites
Thanks, I''ll try it.

I want to be able to perform direct pixel and buffer manipulation, thatZ why I want the surface locked. I don''t know what error is returned (I''ll check that up some time).

It doesn''t actually crash... the function just fails... bluddy function...

I''ll mess with it some more... thanks again

Share this post


Link to post
Share on other sites
Uhm... *blind* - I just discovered what the problem was, on device creation I had to set the "D3DPRESENTFLAG_LOCKABLE_BACKBUFFER" flag.

Great. :D

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!