Commit 942f8210 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove some superfluous casts.

parent 45992843
......@@ -4042,136 +4042,136 @@ static void WINE_GLAPI warn_no_specular_func(void *data) {
}
void fillGLAttribFuncs(WineD3D_GL_Info *gl_info) {
position_funcs[WINED3DDECLTYPE_FLOAT1] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT2] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT3] = (void *) glVertex3fv;
position_funcs[WINED3DDECLTYPE_FLOAT4] = (void *) position_float4;
position_funcs[WINED3DDECLTYPE_D3DCOLOR] = (void *) position_d3dcolor;
position_funcs[WINED3DDECLTYPE_UBYTE4] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_SHORT2] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_SHORT4] = (void *) glVertex2sv;
position_funcs[WINED3DDECLTYPE_UBYTE4N] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_SHORT2N] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_SHORT4N] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_USHORT2N] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_USHORT4N] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_UDEC3] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_DEC3N] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT16_2] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT16_4] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT1] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT2] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT3] = (void *) glColor3fv;
diffuse_funcs[WINED3DDECLTYPE_FLOAT4] = (void *) glColor4fv;
diffuse_funcs[WINED3DDECLTYPE_D3DCOLOR] = (void *) diffuse_d3dcolor;
diffuse_funcs[WINED3DDECLTYPE_UBYTE4] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_SHORT2] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_SHORT4] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_UBYTE4N] = (void *) glColor4ubv;
diffuse_funcs[WINED3DDECLTYPE_SHORT2N] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_SHORT4N] = (void *) glColor4sv;
diffuse_funcs[WINED3DDECLTYPE_USHORT2N] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_USHORT4N] = (void *) glColor4usv;
diffuse_funcs[WINED3DDECLTYPE_UDEC3] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_DEC3N] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT16_2] = (void *) invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT16_4] = (void *) invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT1] = invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT2] = invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT3] = (glAttribFunc)glVertex3fv;
position_funcs[WINED3DDECLTYPE_FLOAT4] = position_float4;
position_funcs[WINED3DDECLTYPE_D3DCOLOR] = position_d3dcolor;
position_funcs[WINED3DDECLTYPE_UBYTE4] = invalid_func;
position_funcs[WINED3DDECLTYPE_SHORT2] = invalid_func;
position_funcs[WINED3DDECLTYPE_SHORT4] = (glAttribFunc)glVertex2sv;
position_funcs[WINED3DDECLTYPE_UBYTE4N] = invalid_func;
position_funcs[WINED3DDECLTYPE_SHORT2N] = invalid_func;
position_funcs[WINED3DDECLTYPE_SHORT4N] = invalid_func;
position_funcs[WINED3DDECLTYPE_USHORT2N] = invalid_func;
position_funcs[WINED3DDECLTYPE_USHORT4N] = invalid_func;
position_funcs[WINED3DDECLTYPE_UDEC3] = invalid_func;
position_funcs[WINED3DDECLTYPE_DEC3N] = invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT16_2] = invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT16_4] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT1] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT2] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT3] = (glAttribFunc)glColor3fv;
diffuse_funcs[WINED3DDECLTYPE_FLOAT4] = (glAttribFunc)glColor4fv;
diffuse_funcs[WINED3DDECLTYPE_D3DCOLOR] = diffuse_d3dcolor;
diffuse_funcs[WINED3DDECLTYPE_UBYTE4] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_SHORT2] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_SHORT4] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_UBYTE4N] = (glAttribFunc)glColor4ubv;
diffuse_funcs[WINED3DDECLTYPE_SHORT2N] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_SHORT4N] = (glAttribFunc)glColor4sv;
diffuse_funcs[WINED3DDECLTYPE_USHORT2N] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_USHORT4N] = (glAttribFunc)glColor4usv;
diffuse_funcs[WINED3DDECLTYPE_UDEC3] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_DEC3N] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT16_2] = invalid_func;
diffuse_funcs[WINED3DDECLTYPE_FLOAT16_4] = invalid_func;
/* No 4 component entry points here */
specular_funcs[WINED3DDECLTYPE_FLOAT1] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_FLOAT2] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_FLOAT1] = invalid_func;
specular_funcs[WINED3DDECLTYPE_FLOAT2] = invalid_func;
if(GL_SUPPORT(EXT_SECONDARY_COLOR)) {
specular_funcs[WINED3DDECLTYPE_FLOAT3] = (void *) GL_EXTCALL(glSecondaryColor3fvEXT);
specular_funcs[WINED3DDECLTYPE_FLOAT3] = (glAttribFunc)GL_EXTCALL(glSecondaryColor3fvEXT);
} else {
specular_funcs[WINED3DDECLTYPE_FLOAT3] = (void *) warn_no_specular_func;
specular_funcs[WINED3DDECLTYPE_FLOAT3] = warn_no_specular_func;
}
specular_funcs[WINED3DDECLTYPE_FLOAT4] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_FLOAT4] = invalid_func;
if(GL_SUPPORT(EXT_SECONDARY_COLOR)) {
specular_funcs[WINED3DDECLTYPE_D3DCOLOR] = (void *) specular_d3dcolor;
specular_funcs[WINED3DDECLTYPE_D3DCOLOR] = specular_d3dcolor;
} else {
specular_funcs[WINED3DDECLTYPE_D3DCOLOR] = (void *) warn_no_specular_func;
specular_funcs[WINED3DDECLTYPE_D3DCOLOR] = warn_no_specular_func;
}
specular_funcs[WINED3DDECLTYPE_UBYTE4] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_SHORT2] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_SHORT4] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_UBYTE4N] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_SHORT2N] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_SHORT4N] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_USHORT2N] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_USHORT4N] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_UDEC3] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_DEC3N] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_FLOAT16_2] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_FLOAT16_4] = (void *) invalid_func;
specular_funcs[WINED3DDECLTYPE_UBYTE4] = invalid_func;
specular_funcs[WINED3DDECLTYPE_SHORT2] = invalid_func;
specular_funcs[WINED3DDECLTYPE_SHORT4] = invalid_func;
specular_funcs[WINED3DDECLTYPE_UBYTE4N] = invalid_func;
specular_funcs[WINED3DDECLTYPE_SHORT2N] = invalid_func;
specular_funcs[WINED3DDECLTYPE_SHORT4N] = invalid_func;
specular_funcs[WINED3DDECLTYPE_USHORT2N] = invalid_func;
specular_funcs[WINED3DDECLTYPE_USHORT4N] = invalid_func;
specular_funcs[WINED3DDECLTYPE_UDEC3] = invalid_func;
specular_funcs[WINED3DDECLTYPE_DEC3N] = invalid_func;
specular_funcs[WINED3DDECLTYPE_FLOAT16_2] = invalid_func;
specular_funcs[WINED3DDECLTYPE_FLOAT16_4] = invalid_func;
/* Only 3 component entry points here. Test how others behave. Float4 normals are used
* by one of our tests, trying to pass it to the pixel shader, which fails on Windows.
*/
normal_funcs[WINED3DDECLTYPE_FLOAT1] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_FLOAT2] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_FLOAT3] = (void *) glNormal3fv;
normal_funcs[WINED3DDECLTYPE_FLOAT4] = (void *) glNormal3fv; /* Just ignore the 4th value */
normal_funcs[WINED3DDECLTYPE_D3DCOLOR] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_UBYTE4] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_SHORT2] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_SHORT4] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_UBYTE4N] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_SHORT2N] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_SHORT4N] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_USHORT2N] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_USHORT4N] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_UDEC3] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_DEC3N] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_FLOAT16_2] = (void *) invalid_func;
normal_funcs[WINED3DDECLTYPE_FLOAT16_4] = (void *) invalid_func;
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT1] = (void *) GL_EXTCALL(glMultiTexCoord1fvARB);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT2] = (void *) GL_EXTCALL(glMultiTexCoord2fvARB);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT3] = (void *) GL_EXTCALL(glMultiTexCoord3fvARB);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT4] = (void *) GL_EXTCALL(glMultiTexCoord4fvARB);
multi_texcoord_funcs[WINED3DDECLTYPE_D3DCOLOR] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_UBYTE4] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_SHORT2] = (void *) GL_EXTCALL(glMultiTexCoord2svARB);
multi_texcoord_funcs[WINED3DDECLTYPE_SHORT4] = (void *) GL_EXTCALL(glMultiTexCoord4svARB);
multi_texcoord_funcs[WINED3DDECLTYPE_UBYTE4N] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_SHORT2N] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_SHORT4N] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_USHORT2N] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_USHORT4N] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_UDEC3] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_DEC3N] = (void *) invalid_texcoord_func;
normal_funcs[WINED3DDECLTYPE_FLOAT1] = invalid_func;
normal_funcs[WINED3DDECLTYPE_FLOAT2] = invalid_func;
normal_funcs[WINED3DDECLTYPE_FLOAT3] = (glAttribFunc)glNormal3fv;
normal_funcs[WINED3DDECLTYPE_FLOAT4] = (glAttribFunc)glNormal3fv; /* Just ignore the 4th value */
normal_funcs[WINED3DDECLTYPE_D3DCOLOR] = invalid_func;
normal_funcs[WINED3DDECLTYPE_UBYTE4] = invalid_func;
normal_funcs[WINED3DDECLTYPE_SHORT2] = invalid_func;
normal_funcs[WINED3DDECLTYPE_SHORT4] = invalid_func;
normal_funcs[WINED3DDECLTYPE_UBYTE4N] = invalid_func;
normal_funcs[WINED3DDECLTYPE_SHORT2N] = invalid_func;
normal_funcs[WINED3DDECLTYPE_SHORT4N] = invalid_func;
normal_funcs[WINED3DDECLTYPE_USHORT2N] = invalid_func;
normal_funcs[WINED3DDECLTYPE_USHORT4N] = invalid_func;
normal_funcs[WINED3DDECLTYPE_UDEC3] = invalid_func;
normal_funcs[WINED3DDECLTYPE_DEC3N] = invalid_func;
normal_funcs[WINED3DDECLTYPE_FLOAT16_2] = invalid_func;
normal_funcs[WINED3DDECLTYPE_FLOAT16_4] = invalid_func;
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT1] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord1fvARB);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2fvARB);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT3] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord3fvARB);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT4] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4fvARB);
multi_texcoord_funcs[WINED3DDECLTYPE_D3DCOLOR] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_UBYTE4] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_SHORT2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2svARB);
multi_texcoord_funcs[WINED3DDECLTYPE_SHORT4] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4svARB);
multi_texcoord_funcs[WINED3DDECLTYPE_UBYTE4N] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_SHORT2N] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_SHORT4N] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_USHORT2N] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_USHORT4N] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_UDEC3] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_DEC3N] = invalid_texcoord_func;
if (GL_SUPPORT(NV_HALF_FLOAT))
{
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = (void *) GL_EXTCALL(glMultiTexCoord2hvNV);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = (void *) GL_EXTCALL(glMultiTexCoord4hvNV);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2hvNV);
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4hvNV);
} else {
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = (void *) invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = invalid_texcoord_func;
}
texcoord_funcs[WINED3DDECLTYPE_FLOAT1] = (void *) glTexCoord1fv;
texcoord_funcs[WINED3DDECLTYPE_FLOAT2] = (void *) glTexCoord2fv;
texcoord_funcs[WINED3DDECLTYPE_FLOAT3] = (void *) glTexCoord3fv;
texcoord_funcs[WINED3DDECLTYPE_FLOAT4] = (void *) glTexCoord4fv;
texcoord_funcs[WINED3DDECLTYPE_D3DCOLOR] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_UBYTE4] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_SHORT2] = (void *) glTexCoord2sv;
texcoord_funcs[WINED3DDECLTYPE_SHORT4] = (void *) glTexCoord4sv;
texcoord_funcs[WINED3DDECLTYPE_UBYTE4N] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_SHORT2N] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_SHORT4N] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_USHORT2N] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_USHORT4N] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_UDEC3] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_DEC3N] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_FLOAT1] = (glAttribFunc)glTexCoord1fv;
texcoord_funcs[WINED3DDECLTYPE_FLOAT2] = (glAttribFunc)glTexCoord2fv;
texcoord_funcs[WINED3DDECLTYPE_FLOAT3] = (glAttribFunc)glTexCoord3fv;
texcoord_funcs[WINED3DDECLTYPE_FLOAT4] = (glAttribFunc)glTexCoord4fv;
texcoord_funcs[WINED3DDECLTYPE_D3DCOLOR] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_UBYTE4] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_SHORT2] = (glAttribFunc)glTexCoord2sv;
texcoord_funcs[WINED3DDECLTYPE_SHORT4] = (glAttribFunc)glTexCoord4sv;
texcoord_funcs[WINED3DDECLTYPE_UBYTE4N] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_SHORT2N] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_SHORT4N] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_USHORT2N] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_USHORT4N] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_UDEC3] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_DEC3N] = invalid_func;
if (GL_SUPPORT(NV_HALF_FLOAT))
{
texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = (void *) GL_EXTCALL(glTexCoord2hvNV);
texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = (void *) GL_EXTCALL(glTexCoord4hvNV);
texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = (glAttribFunc)GL_EXTCALL(glTexCoord2hvNV);
texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = (glAttribFunc)GL_EXTCALL(glTexCoord4hvNV);
} else {
texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = (void *) invalid_func;
texcoord_funcs[WINED3DDECLTYPE_FLOAT16_2] = invalid_func;
texcoord_funcs[WINED3DDECLTYPE_FLOAT16_4] = invalid_func;
}
}
......
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