About software rendering
Posted: Thu May 01, 2014 9:08 am
Hi,guys!
I have a problem about software rendering, and i found that it is a tough work about gui stuff. I have try a lot to find a way to solve my problem,and i failed because of the lack of wiki, toturials or codes. so, i would be very appreciate if some can post me some details.
Ok, let's check out my current status and problem, i have a well functional vesa driver, and i can draw anything i want on screen. I tend to using double buffering for performence consideration. let's say the the vedio memory address is A, and i reserved the same size memory in system memory address space which is B, when i draw something on screen, i just draw it in B,and then do a fast memcpy from B to A.By the way, i have made a bitblt() function based on the description of MSDN(http://msdn.microsoft.com/en-us/library ... s.85).aspx), and it also work fine.
now, my desktop have some pictures, and i want to move one from position PA to position PB, if there is nothing but a background picture underneath it, i just restore the old place pixels using bitblt() with raster operation code = SRCCOPY,
but, when there are two or more pictures underneath it, how could i figure out which picture i should redraw.
for example, the orignal desktop looks like this: when i do a moving of the mail picture, the desktop looks like this: there are three places i should redraw, Message, Pictures,and the old place of Mail picture. I would be very appreciate that someone can share some good solutions. thanks a lot.
I have a problem about software rendering, and i found that it is a tough work about gui stuff. I have try a lot to find a way to solve my problem,and i failed because of the lack of wiki, toturials or codes. so, i would be very appreciate if some can post me some details.
Ok, let's check out my current status and problem, i have a well functional vesa driver, and i can draw anything i want on screen. I tend to using double buffering for performence consideration. let's say the the vedio memory address is A, and i reserved the same size memory in system memory address space which is B, when i draw something on screen, i just draw it in B,and then do a fast memcpy from B to A.By the way, i have made a bitblt() function based on the description of MSDN(http://msdn.microsoft.com/en-us/library ... s.85).aspx), and it also work fine.
now, my desktop have some pictures, and i want to move one from position PA to position PB, if there is nothing but a background picture underneath it, i just restore the old place pixels using bitblt() with raster operation code = SRCCOPY,
but, when there are two or more pictures underneath it, how could i figure out which picture i should redraw.
for example, the orignal desktop looks like this: when i do a moving of the mail picture, the desktop looks like this: there are three places i should redraw, Message, Pictures,and the old place of Mail picture. I would be very appreciate that someone can share some good solutions. thanks a lot.