[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On May 17, 2010, Evert Glebbeek wrote:
> On 17 May 2010, at 21:04 , Pavel Sountsov wrote:
> > I'll look into this again. I had a (perhaps) promising idea, but it
> > might not be viable since it requires shaders in D3D. This is a problem
> > since Intel GPU's might not support enough (or any) shader features
> > that we need, disqualifying this solution (or forcing us to convert
> > colors for Intel cards).
>
> Sounds excellent.
> Is there an alternative option where we can store the required data in
> the colour struct in the case we're using the D3D driver (perhaps only
> if the shaders can't be used as a work-around)?
>
> Evert
> -------------------------------------------------------------------------
> -----
It might be possible to extend the color stuct with an inner union holding
the floats, and a d3d specific int in two different structs. But this sort
of thing is highly ABI breaking, so it'll have to be done soon, and made
sure to handle anything we might want to throw at it in the future so it
doesn't have to change again.
Something like this maybe:
struct ALLEGRO_COLOR {
union {
struct separate {
double r,g,b,a;
};
uint32 combined;
};
};
Might need more tags/names in msvc, not sure it supports anonymous un typed
unions in structs like that.
Could skip the outer struct too and make the union ALLEGRO_COLOR. Of course
I could be missing something and this just "can't" work.
--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx