Re: [AD] 4.9.20

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


> 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)?

That cure sounds worse than the disease.

I don't think we should push too hard on this.  Sometimes one
representation makes more sense than another, like cartesian vs polar
coordinates.

Peter

Okay, I removed ALLEGRO_PRIM_COLOR. Basically, what I did is made the D3D driver use shaders to make it understand the OpenGL color format. Specifically, I pass the 4 float components of the color to the D3D driver as a 4D texture coordinate. That color components are then set to those texture coordinate components in the shader. Since shaders don't work in some older cards (e.g. kenmasters1976 @ allegro.cc has one like that) so I re-added the Intel card workabout, which just involves transcribing the vertices into a temporary buffer. I wrapped that up in a mutex for thread safety. For Windows dislikers, this solution is notable for not affecting OpenGL code at all. It doesn't affect D3D driver much either (except for the older Intel cards), so everyone should be happy.

-SiegeLord




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