Skip to main content
gamedev.net
🔒 Locked

DirectSurface Writing

Started by Tooko Jan 12, 2004 at 2:10 AM 1 replies 250+ views
Original Post
Tooko
Tooko
How can I write directly to a surface in DX8? I know you can as it was a efature in 7, and they wouldn''t take it out. I''ve looked at LockRect, but it says it can only lock a rect of a certain type. but that type doesn''t work. Instead, I''ve found out I can only lock bump maps. How would I go about it?
Why do Suicide Bombers think they''re going to a better place? Don''t they know their going all over the place?
the future is just like the past, just later. - TANSTAAFL
Morten
Morten
You must have a bug somewhere, because LockRect is how you normally get the images onto the textures when you create them.
You can lock all managed texture formats, atleast.
If you want to lock the backbuffer, you''ll need one of the lockable formats.

-Morten-
Tooko
Tooko
I really don''t have any great ideas of how to use it yet, I''m just trying to write something onto an offscreen surface and blit it. It''s not a back buffer or anything.

I''ve ripped the code from one of the samples and replaced (what I thought) were the required bits of info...



Why do Suicide Bombers think they''re going to a better place?
Don''t they know their going all over the place?
the future is just like the past, just later. - TANSTAAFL

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.