wined3d: Use EXT_provoking_vertex to match Direct3D's provoking vertex convention.

oldstable
Henri Verbeet 2009-08-10 09:30:50 +02:00 committed by Alexandre Julliard
parent ac64bf6406
commit 3b06fc92f4
2 changed files with 15 additions and 2 deletions

View File

@ -6586,8 +6586,15 @@ static void shademode_test(IDirect3DDevice9 *device)
switch(shademode) {
case D3DSHADE_FLAT:
/* Should take the color of the first vertex of each triangle */
todo_wine ok(color0 == 0x00ff0000, "FLAT shading has color0 %08x, expected 0x00ff0000 (todo)\n", color0);
todo_wine ok(color1 == 0x0000ff00, "FLAT shading has color1 %08x, expected 0x0000ff00 (todo)\n", color1);
if (0)
{
/* This test depends on EXT_provoking_vertex being
* available. This extension is currently (20090810)
* not common enough to let the test fail if it isn't
* present. */
ok(color0 == 0x00ff0000, "FLAT shading has color0 %08x, expected 0x00ff0000\n", color0);
ok(color1 == 0x0000ff00, "FLAT shading has color1 %08x, expected 0x0000ff00\n", color1);
}
shademode = D3DSHADE_GOURAUD;
break;
case D3DSHADE_GOURAUD:

View File

@ -1357,6 +1357,12 @@ struct wined3d_context *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceI
glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
checkGLcall("glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)");
}
if (GL_SUPPORT(EXT_PROVOKING_VERTEX))
{
GL_EXTCALL(glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT));
}
LEAVE_GL();
This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE);