wined3d: Pass explicit texcoords to depth blt.

This commit is contained in:
Henri Verbeet 2008-10-27 18:31:31 +01:00 committed by Alexandre Julliard
parent 57401fcab2
commit 437b342424
3 changed files with 6 additions and 4 deletions

View File

@ -1788,8 +1788,7 @@ static GLuint create_arb_blt_vertex_program(WineD3D_GL_Info *gl_info) {
"PARAM c[1] = { { 1, 0.5 } };\n"
"MOV result.position, vertex.position;\n"
"MOV result.color, c[0].x;\n"
"MAD result.texcoord[0].y, -vertex.position, c[0], c[0];\n"
"MAD result.texcoord[0].x, vertex.position, c[0].y, c[0].y;\n"
"MOV result.texcoord[0], vertex.texcoord[0];\n"
"END\n";
GL_EXTCALL(glGenProgramsARB(1, &program_id));

View File

@ -3388,8 +3388,7 @@ static GLhandleARB create_glsl_blt_shader(WineD3D_GL_Info *gl_info) {
"{\n"
" gl_Position = gl_Vertex;\n"
" gl_FrontColor = vec4(1.0);\n"
" gl_TexCoord[0].x = (gl_Vertex.x * 0.5) + 0.5;\n"
" gl_TexCoord[0].y = (-gl_Vertex.y * 0.5) + 0.5;\n"
" gl_TexCoord[0] = gl_MultiTexCoord0;\n"
"}\n"
};

View File

@ -3979,9 +3979,13 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, GLuint texture, GLsizei
device->shader_backend->shader_select_depth_blt((IWineD3DDevice *)device, tex_2d);
glBegin(GL_TRIANGLE_STRIP);
glTexCoord2f(0.0f, 1.0f);
glVertex2f(-1.0f, -1.0f);
glTexCoord2f(1.0f, 1.0f);
glVertex2f(1.0f, -1.0f);
glTexCoord2f(0.0f, 0.0f);
glVertex2f(-1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f);
glVertex2f(1.0f, 1.0f);
glEnd();