Jump to content
  • Advertisement

Archived

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

holy

please help !

This topic is 6474 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

hi, i wanna change pixels of my directdrawsurface at one time so i described a pointer and i assigned it to my color table ,after that assigning my pointer to directdrawsurface pointer,but it does not work properly.... for y:=0 to 479 do for x:=0 to 639 do color_table[x+y*640]:=... my_pointer:=@color_table; dxdraw1.surface.isurface4.lock(... copymemory(surfacedesc.lpsurface,my_pointer,length); dxdraw1.surface.isurface4.unlock(@surfacedesc); something is wrong but i could not find it...

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by holy

hi,

i wanna change pixels of my directdrawsurface at one time so
i described a pointer and i assigned it to my color table ,after that assigning my pointer to directdrawsurface pointer,but it does not work properly....




Why not use a BLT instruction (with the DDBLT_COLOR argument or something like that... It specifies a unique color that will fill the rectangle you want) instead ?
Chances are that it would take advantage of your hardware''s blitting capacities and render much faster than with a pixel-per-pixel access...!


--
Kyodai Mahjongg
kyodai.com

Share this post


Link to post
Share on other sites
DDBLT_COLORFILL. And you have a DDBLTFX structure with .dwFillCOlor and dwSize set.

------------------------------
#pragma twice

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!