Commit 7c86d91b authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: glBlend* fixes.

parent 51a6a111
......@@ -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;
}
......
......@@ -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;
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment