Re: Alphablending



where is the
#include ...

www.liimatta.org

Does this use hardware akseleration? Or GDI?

It does not use hardware acceleration. The drawing is done to offscreen
surface (the "screen" object in the sourcecode). The
"fusion::core::framebuffer" object is the interface to platform
specific framebuffer implementation, in the case of Windows it uses
DirectDraw (but not hardware accelerated, it mainly locks the primary
surface and does a memory copy (including color conversion when
needed)).

It is 32k, and ALL SOURCE are included in the EXE.

How well does this work with versioning systems like CVS or Perforce? A
file which is both ascii -and- binary sounds like a hack in this
regard, imagine how you would resolve conflicts, and I assume there
will be a large number of them if more than one person is concurrently
working on the same file.


It draws to a memory buffer, and it uses GDI for outputting the result.
Instead of moving the leaf around, in a cricle, you can just use your mouse
to move it around. On my PC this looks even smoother.

That's great!

Ok. So it uses GDI then.

No, it doesn't. I mean that I wrote the MMX innerloops in late 1990's,
which makes the code fairly old. Hardware acceleration of such trivial
features made the code obsolete for any serious use. I'd use DirectX or
OpenGL for any serious non-toy application.

There might be cases, even with a 3D blitter, that you need to do some
handywork.

Maybe, but that's not really interesting.

Its still states in the DirectX docs that
the organixation of the applications database (culling, clipping) is more
important then advantages in hardware.

Depends on what you are rendering. If you are doing some simple 2D
drawing I'd be more concerned with having large rendering batches with
single draw call than manually clipping/culling a few primitives that
might be trivially rejected.

I'd be more concerned about updating the *texture* that is used for
refreshing the canvas, unnecessary client draw requests will just load
the CPU with unnecessary work, and also burn bandwidth for updating the
textures.

.