[AD] floating point bitmaps

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I just committed a patch to add a new pixel format
ALLEGRO_PIXEL_FORMAT_ABGR_F32. It corresponds to GL_RGBA32F_ARB in
OpenGL and D3DFMT_A32B32G32R32F in DirectX.

Adding it to the OpenGL driver took about 1 second (and likely similar
for D3D9) - but the software converters took me forever to write. We
really should also support GL_RGB16F_ARB/D3DFMT_R16F as they have twice
the fill rate. And also the non-alpha versions of both. But supporting
them all in the software converters would be a pain.

I'm thinking that maybe we should support bitmaps with non-Allegro
formats. You could do everything with them you can with normal bitmaps,
just never lock them. Initial data would be fed to them with the already
existing bitmap->vt->upload method, and drawing to them in OpenGL would
work using FBO. (Without FBO you could not draw to them as it would
require locking.) The advantage would be that we could then easily add
support for all the formats common to OpenGL and DirectX, without having
to write software converters for all the N^2 possible conversions.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/