Skip to main content
gamedev.net
🔒 Locked

please help !

Started by holy 1 reply 450+ views
Original Post
holy
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.... 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...
Kyodai no Naoki
Kyodai no Naoki
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
--Kyodai Mahjonggkyodai.com
furby100
furby100
DDBLT_COLORFILL. And you have a DDBLTFX structure with .dwFillCOlor and dwSize set.

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

Topic Locked

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

Sign in to reply to this topic.