WineD3D: glBlend* fixes
Roland Scheidegger
rscheidegger_lists at hispeed.ch
Tue Sep 26 14:43:15 CDT 2006
Roderick Colenbrander wrote:
> On windows the opengl32.dll exports glBlendColor by default and as
> opengl32.dll is opengl 1.1 I thought that it was a core function. So
> you say that it is backed by GL_ARB_imaging. The problem is that
> basicly only Nvidia advertises it and the other drivers don't. The GL
> version could be detected but we don't like GL version checks.
> Vendors should still advertise GL_ARB_imaging for backwards
> compatibility if they do support 1.4 or higher but ATI and friends
> don't :(
They can't if they don't support the other sub-extensions of
GL_ARB_imaging, ONLY the 3 blend extensions of GL_ARB_imaging are core
1.4. But if you only want to check for one extension, then I'd think
that EXT_blend_color would be the obvious choice (because a driver
probably really should announce support for that if it either supports
ARB_imaging or is version 1.4).
>>> from ARB_imaging is ok. If only either EXT_blend_minmax or
>> EXT_blend_subtract is supported, then glBlendEquation is supported,
>> but only different modes are valid (FUNC_ADD, MIN, MAX for
>> EXT_blend_minmax, FUNC_ADD, FUNC_SUBTRACT, FUNC_REVERSE_SUBTRACT
>> for EXT_blend_subtract). But if all you care is that
>> glBlendEquation is available, you should probably detect ogl 1.4,
>> and EXT_blend_subtract (some cards only support EXT_blend_subtract
>> but not EXT_blend_minmax), but really for correctness
>> EXT_blend_minmax and ARB_imaging should be checked too.
>>
>
> Right now we only use ADD/MIN/MAX/SUBTRACT/REVSUBTRACT. For
> correctness we would need to check for EXT_blend_subtract aswell.
> Right now only EXT_blend_minmax is checked. A version check is more
> or less out of the question (Alexandre only accepts such things when
> it is really needed). We could wait till problems arise as wined3d
> will give some GL warnings then.
I'd just think if you want to make sure it's legal to call
glBlendEquation but not the mode itself, then check for
EXT_blend_subtract, not EXT_blend_minmax, as it's more widespread.
Roland
More information about the wine-devel
mailing list