wined3d: glBlend* fixes.

This commit is contained in:
Roderick Colenbrander 2006-09-22 07:58:38 +02:00 committed by Alexandre Julliard
parent 51a6a11120
commit 7c86d91bb9
3 changed files with 15 additions and 15 deletions

View File

@ -3700,7 +3700,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
FIXME("Unrecognized/Unhandled D3DBLENDOP value %ld\n", Value);
}
if(GL_SUPPORT(ARB_IMAGING)) {
if(GL_SUPPORT(EXT_BLEND_MINMAX)) {
TRACE("glBlendEquation(%x)\n", glParm);
GL_EXTCALL(glBlendEquation(glParm));
checkGLcall("glBlendEquation");
@ -4509,23 +4509,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case WINED3DRS_BLENDFACTOR :
{
float col[4];
if (GL_SUPPORT(ARB_IMAGING)) {
TRACE("Setting BlendFactor to %ld", Value);
TRACE("Setting BlendFactor to %ld\n", Value);
D3DCOLORTOGLFLOAT4(Value, col);
if (0xFFFFFFFF != Value) {
glEnable(GL_BLEND);
checkGLcall("glEnable(GL_BLEND)");
}
else {
glDisable(GL_BLEND);
checkGLcall("glDisable(GL_BLEND)");
}
glBlendColor (col[0],col[1],col[2],col[3]);
} else {
WARN("Unsupported in local OpenGL implementation: glBlendColor\n");
D3DCOLORTOGLFLOAT4(Value, col);
if (0xFFFFFFFF != Value) {
glEnable(GL_BLEND);
checkGLcall("glEnable(GL_BLEND)");
}
else {
glDisable(GL_BLEND);
checkGLcall("glDisable(GL_BLEND)");
}
glBlendColor (col[0],col[1],col[2],col[3]);
break;
}

View File

@ -640,6 +640,9 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display) {
} else if (strcmp(ThisExtn, "GL_EXT_framebuffer_object") == 0) {
TRACE_(d3d_caps)(" FOUND: EXT Frame Buffer Object support\n");
gl_info->supported[EXT_FRAMEBUFFER_OBJECT] = TRUE;
} else if (strcmp(ThisExtn, "GL_EXT_blend_minmax") == 0) {
TRACE_(d3d_caps)(" FOUND: EXT Blend minmax support\n");
gl_info->supported[EXT_BLEND_MINMAX] = TRUE;
} else if (strcmp(ThisExtn, "GL_EXT_paletted_texture") == 0) { /* handle paletted texture extensions */
TRACE_(d3d_caps)(" FOUND: EXT Paletted texture support\n");
gl_info->supported[EXT_PALETTED_TEXTURE] = TRUE;

View File

@ -1429,6 +1429,7 @@ typedef enum _GL_SupportedExt {
ARB_VERTEX_BUFFER_OBJECT,
ARB_VERTEX_SHADER,
/* EXT */
EXT_BLEND_MINMAX,
EXT_FOG_COORD,
EXT_FRAMEBUFFER_OBJECT,
EXT_PALETTED_TEXTURE,