mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Use D3DFVF_XYZ for PC, D3DFVF_XYZRHW for Xbox
This commit is contained in:
parent
ae52cd2c68
commit
9d144e28fc
@ -84,7 +84,11 @@
|
||||
#elif defined(HAVE_D3D9)
|
||||
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1)
|
||||
#elif defined(HAVE_D3D8)
|
||||
#ifdef _XBOX
|
||||
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW | D3DFVF_TEX1)
|
||||
#else
|
||||
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ | D3DFVF_TEX1)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -59,7 +59,9 @@ typedef struct Vertex
|
||||
float x, y;
|
||||
#if defined(HAVE_D3D8)
|
||||
float z;
|
||||
#ifdef _XBOX
|
||||
float rhw;
|
||||
#endif
|
||||
#endif
|
||||
float u, v;
|
||||
} Vertex;
|
||||
|
@ -124,31 +124,35 @@ static void d3d8_renderchain_set_vertices(void *data, unsigned pass,
|
||||
vert[0].x = -1.0f;
|
||||
vert[0].y = -1.0f;
|
||||
vert[0].z = 1.0f;
|
||||
vert[0].rhw = 0.0f;
|
||||
|
||||
vert[0].u = tex_h;
|
||||
vert[0].v = 0.0f;
|
||||
|
||||
vert[1].x = 1.0f;
|
||||
vert[1].y = -1.0f;
|
||||
vert[1].z = 1.0f;
|
||||
vert[1].rhw = tex_w;
|
||||
vert[1].u = tex_h;
|
||||
vert[1].v = 0.0f;
|
||||
|
||||
vert[2].x = -1.0f;
|
||||
vert[2].y = 1.0f;
|
||||
vert[2].z = 1.0f;
|
||||
vert[2].rhw = 0.0f;
|
||||
vert[2].u = 0.0f;
|
||||
vert[2].v = 0.0f;
|
||||
|
||||
vert[3].x = 1.0f;
|
||||
vert[3].y = 1.0f;
|
||||
vert[3].z = 1.0f;
|
||||
vert[3].rhw = tex_w;
|
||||
vert[3].u = 0.0f;
|
||||
vert[3].v = 0.0f;
|
||||
|
||||
#ifdef _XBOX
|
||||
vert[0].rhw = 0.0f;
|
||||
vert[1].rhw = tex_w;
|
||||
vert[2].rhw = 0.0f;
|
||||
vert[3].rhw = tex_w;
|
||||
#endif
|
||||
|
||||
/* Align texels and vertices. */
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user