Re: [AD] memory bitmap blending

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


On Fri, 2008-12-12 at 07:52 -0700, Trent Gamblin wrote:
> On Fri, December 12, 2008 7:31 am, Elias Pschernig said:
> > If DirectX doesn't support separate alpha, we could fall back to memory
> > bending for the separate alpha modes there and add a way for users to
> > query if accelerated separate-alpha blending is supported. I forgot if
> > we already do this for something else, if not, then if DX doesn't
> > support it it's probably an argument to not apply it.
> 
> I'm pretty sure dx supports them,
> See http://msdn.microsoft.com/en-us/library/bb172599(VS.85).aspx
> at the very bottom, SRCBLENDALPHA and DESTBLENDALPHA. If I understand
> correctly those are the same as the OpenGL separate alpha variables.
> 

Ah, nice. It says:

D3DRS_SEPARATEALPHABLENDENABLE
        TRUE enables the separate blend mode for the alpha channel. The
        default value is FALSE. 
        When set to false, the render-target blending factors and
        operations applied to alpha are forced to be the same as those
        defined for color. This mode is effectively hardwired to false
        on implementations that don't set the cap
        D3DPMISCCAPS_SEPARATEALPHABLEND. See D3DPMISCCAPS.
        The type of separate alpha blending is determined by the
        D3DRS_SRCBLENDALPHA and D3DRS_DESTBLENDALPHA render states.
D3DRS_SRCBLENDALPHA
        One member of the D3DBLEND enumerated type. This value is
        ignored unless D3DRS_SEPARATEALPHABLENDENABLE is true. The
        default value is D3DBLEND_ONE.
D3DRS_DESTBLENDALPHA
        One member of the D3DBLEND enumerated type. This value is
        ignored unless D3DRS_SEPARATEALPHABLENDENABLE is true. The
        default value is D3DBLEND_ZERO.

The question now is, what about D3DPMISCCAPS_SEPARATEALPHABLEND. Are
there drivers where this is not available? What should Allegro do in
such a case?

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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