Tech Support > Microsoft Windows > Development Resources > DirectX again
DirectX again
Posted by Kalle Rutanen on May 23rd, 2004


Hello

I'm using DirectX 9 and VC++Net2003. For a while I've been software
rendering my pixels, lines and circles to image buffers (surfaces). I also
use software blits. Now I'd like to make my drawing engine faster by using
hardware blitting and filling. So I had an idea about using Direct3D
ColorFill function as my basic primitive. I could use it for pixels,
horizontal lines, vertical lines and boxes. But... I'm facing certain
difficulties. I noticed after a while of debugging, that ColorFill has a
minimum rectangle that it can handle, and in my computer it is 2*4
(width*height). Rectangles smaller than this won't work. So how would you
get around drawing pixels and axis-aligned lines without locking a surface
(that is, using hardware) ?. My interest is in 2D graphics.

Also another question: How would you get pixel's color fast without locking
a buffer ?



Similar Posts