wined3d: Get rid of the WINED3DPRIMITIVETYPE typedef.

This commit is contained in:
Henri Verbeet 2011-12-11 21:43:32 +01:00 committed by Alexandre Julliard
parent b55b683b08
commit e6a4a86608
5 changed files with 58 additions and 58 deletions

View File

@ -270,7 +270,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetPrimitiveTopology(ID3D10Device *
TRACE("iface %p, topology %s\n", iface, debug_d3d10_primitive_topology(topology));
wined3d_device_set_primitive_type(This->wined3d_device, (WINED3DPRIMITIVETYPE)topology);
wined3d_device_set_primitive_type(This->wined3d_device, (enum wined3d_primitive_type)topology);
}
static void STDMETHODCALLTYPE d3d10_device_VSSetShaderResources(ID3D10Device *iface,
@ -490,7 +490,7 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device *
TRACE("iface %p, topology %p\n", iface, topology);
wined3d_device_get_primitive_type(This->wined3d_device, (WINED3DPRIMITIVETYPE *)topology);
wined3d_device_get_primitive_type(This->wined3d_device, (enum wined3d_primitive_type *)topology);
}
static void STDMETHODCALLTYPE d3d10_device_VSGetShaderResources(ID3D10Device *iface,

View File

@ -62,38 +62,38 @@ const float identity[] =
/* Note that except for WINED3DPT_POINTLIST and WINED3DPT_LINELIST these
* actually have the same values in GL and D3D. */
static GLenum gl_primitive_type_from_d3d(WINED3DPRIMITIVETYPE primitive_type)
static GLenum gl_primitive_type_from_d3d(enum wined3d_primitive_type primitive_type)
{
switch(primitive_type)
{
case WINED3DPT_POINTLIST:
case WINED3D_PT_POINTLIST:
return GL_POINTS;
case WINED3DPT_LINELIST:
case WINED3D_PT_LINELIST:
return GL_LINES;
case WINED3DPT_LINESTRIP:
case WINED3D_PT_LINESTRIP:
return GL_LINE_STRIP;
case WINED3DPT_TRIANGLELIST:
case WINED3D_PT_TRIANGLELIST:
return GL_TRIANGLES;
case WINED3DPT_TRIANGLESTRIP:
case WINED3D_PT_TRIANGLESTRIP:
return GL_TRIANGLE_STRIP;
case WINED3DPT_TRIANGLEFAN:
case WINED3D_PT_TRIANGLEFAN:
return GL_TRIANGLE_FAN;
case WINED3DPT_LINELIST_ADJ:
case WINED3D_PT_LINELIST_ADJ:
return GL_LINES_ADJACENCY_ARB;
case WINED3DPT_LINESTRIP_ADJ:
case WINED3D_PT_LINESTRIP_ADJ:
return GL_LINE_STRIP_ADJACENCY_ARB;
case WINED3DPT_TRIANGLELIST_ADJ:
case WINED3D_PT_TRIANGLELIST_ADJ:
return GL_TRIANGLES_ADJACENCY_ARB;
case WINED3DPT_TRIANGLESTRIP_ADJ:
case WINED3D_PT_TRIANGLESTRIP_ADJ:
return GL_TRIANGLE_STRIP_ADJACENCY_ARB;
default:
@ -102,43 +102,43 @@ static GLenum gl_primitive_type_from_d3d(WINED3DPRIMITIVETYPE primitive_type)
}
}
static WINED3DPRIMITIVETYPE d3d_primitive_type_from_gl(GLenum primitive_type)
static enum wined3d_primitive_type d3d_primitive_type_from_gl(GLenum primitive_type)
{
switch(primitive_type)
{
case GL_POINTS:
return WINED3DPT_POINTLIST;
return WINED3D_PT_POINTLIST;
case GL_LINES:
return WINED3DPT_LINELIST;
return WINED3D_PT_LINELIST;
case GL_LINE_STRIP:
return WINED3DPT_LINESTRIP;
return WINED3D_PT_LINESTRIP;
case GL_TRIANGLES:
return WINED3DPT_TRIANGLELIST;
return WINED3D_PT_TRIANGLELIST;
case GL_TRIANGLE_STRIP:
return WINED3DPT_TRIANGLESTRIP;
return WINED3D_PT_TRIANGLESTRIP;
case GL_TRIANGLE_FAN:
return WINED3DPT_TRIANGLEFAN;
return WINED3D_PT_TRIANGLEFAN;
case GL_LINES_ADJACENCY_ARB:
return WINED3DPT_LINELIST_ADJ;
return WINED3D_PT_LINELIST_ADJ;
case GL_LINE_STRIP_ADJACENCY_ARB:
return WINED3DPT_LINESTRIP_ADJ;
return WINED3D_PT_LINESTRIP_ADJ;
case GL_TRIANGLES_ADJACENCY_ARB:
return WINED3DPT_TRIANGLELIST_ADJ;
return WINED3D_PT_TRIANGLELIST_ADJ;
case GL_TRIANGLE_STRIP_ADJACENCY_ARB:
return WINED3DPT_TRIANGLESTRIP_ADJ;
return WINED3D_PT_TRIANGLESTRIP_ADJ;
default:
FIXME("Unhandled primitive type %s\n", debug_d3dprimitivetype(primitive_type));
return WINED3DPT_UNDEFINED;
return WINED3D_PT_UNDEFINED;
}
}
@ -4045,7 +4045,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
}
void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
WINED3DPRIMITIVETYPE primitive_type)
enum wined3d_primitive_type primitive_type)
{
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
@ -4054,7 +4054,7 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
}
void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device,
WINED3DPRIMITIVETYPE *primitive_type)
enum wined3d_primitive_type *primitive_type)
{
TRACE("device %p, primitive_type %p\n", device, primitive_type);

View File

@ -1993,25 +1993,25 @@ const char *debug_d3dresourcetype(WINED3DRESOURCETYPE res)
}
}
const char *debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType)
const char *debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type)
{
switch (PrimitiveType)
switch (primitive_type)
{
#define PRIM_TO_STR(prim) case prim: return #prim
PRIM_TO_STR(WINED3DPT_UNDEFINED);
PRIM_TO_STR(WINED3DPT_POINTLIST);
PRIM_TO_STR(WINED3DPT_LINELIST);
PRIM_TO_STR(WINED3DPT_LINESTRIP);
PRIM_TO_STR(WINED3DPT_TRIANGLELIST);
PRIM_TO_STR(WINED3DPT_TRIANGLESTRIP);
PRIM_TO_STR(WINED3DPT_TRIANGLEFAN);
PRIM_TO_STR(WINED3DPT_LINELIST_ADJ);
PRIM_TO_STR(WINED3DPT_LINESTRIP_ADJ);
PRIM_TO_STR(WINED3DPT_TRIANGLELIST_ADJ);
PRIM_TO_STR(WINED3DPT_TRIANGLESTRIP_ADJ);
PRIM_TO_STR(WINED3D_PT_UNDEFINED);
PRIM_TO_STR(WINED3D_PT_POINTLIST);
PRIM_TO_STR(WINED3D_PT_LINELIST);
PRIM_TO_STR(WINED3D_PT_LINESTRIP);
PRIM_TO_STR(WINED3D_PT_TRIANGLELIST);
PRIM_TO_STR(WINED3D_PT_TRIANGLESTRIP);
PRIM_TO_STR(WINED3D_PT_TRIANGLEFAN);
PRIM_TO_STR(WINED3D_PT_LINELIST_ADJ);
PRIM_TO_STR(WINED3D_PT_LINESTRIP_ADJ);
PRIM_TO_STR(WINED3D_PT_TRIANGLELIST_ADJ);
PRIM_TO_STR(WINED3D_PT_TRIANGLESTRIP_ADJ);
#undef PRIM_TO_STR
default:
FIXME("Unrecognized %u WINED3DPRIMITIVETYPE!\n", PrimitiveType);
FIXME("Unrecognized %u primitive type!\n", primitive_type);
return "unrecognized";
}
}

View File

@ -2484,7 +2484,7 @@ const char *debug_d3dusage(DWORD usage) DECLSPEC_HIDDEN;
const char *debug_d3dusagequery(DWORD usagequery) DECLSPEC_HIDDEN;
const char *debug_d3ddeclmethod(WINED3DDECLMETHOD method) DECLSPEC_HIDDEN;
const char *debug_d3ddeclusage(BYTE usage) DECLSPEC_HIDDEN;
const char *debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType) DECLSPEC_HIDDEN;
const char *debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type) DECLSPEC_HIDDEN;
const char *debug_d3drenderstate(WINED3DRENDERSTATETYPE state) DECLSPEC_HIDDEN;
const char *debug_d3dsamplerstate(DWORD state) DECLSPEC_HIDDEN;
const char *debug_d3dstate(DWORD state) DECLSPEC_HIDDEN;

View File

@ -74,21 +74,20 @@ enum wined3d_light_type
WINED3D_LIGHT_GLSPOT = 5, /* D3D7 */
};
typedef enum _WINED3DPRIMITIVETYPE
enum wined3d_primitive_type
{
WINED3DPT_UNDEFINED = 0,
WINED3DPT_POINTLIST = 1,
WINED3DPT_LINELIST = 2,
WINED3DPT_LINESTRIP = 3,
WINED3DPT_TRIANGLELIST = 4,
WINED3DPT_TRIANGLESTRIP = 5,
WINED3DPT_TRIANGLEFAN = 6,
WINED3DPT_LINELIST_ADJ = 10,
WINED3DPT_LINESTRIP_ADJ = 11,
WINED3DPT_TRIANGLELIST_ADJ = 12,
WINED3DPT_TRIANGLESTRIP_ADJ = 13,
WINED3DPT_FORCE_DWORD = 0x7fffffff
} WINED3DPRIMITIVETYPE;
WINED3D_PT_UNDEFINED = 0,
WINED3D_PT_POINTLIST = 1,
WINED3D_PT_LINELIST = 2,
WINED3D_PT_LINESTRIP = 3,
WINED3D_PT_TRIANGLELIST = 4,
WINED3D_PT_TRIANGLESTRIP = 5,
WINED3D_PT_TRIANGLEFAN = 6,
WINED3D_PT_LINELIST_ADJ = 10,
WINED3D_PT_LINESTRIP_ADJ = 11,
WINED3D_PT_TRIANGLELIST_ADJ = 12,
WINED3D_PT_TRIANGLESTRIP_ADJ = 13,
};
typedef enum _WINED3DDEVTYPE
{
@ -2150,7 +2149,7 @@ HRESULT __cdecl wined3d_device_get_material(const struct wined3d_device *device,
float __cdecl wined3d_device_get_npatch_mode(const struct wined3d_device *device);
struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(const struct wined3d_device *device);
void __cdecl wined3d_device_get_primitive_type(const struct wined3d_device *device,
WINED3DPRIMITIVETYPE *primitive_topology);
enum wined3d_primitive_type *primitive_topology);
HRESULT __cdecl wined3d_device_get_ps_consts_b(const struct wined3d_device *device,
UINT start_register, BOOL *constants, UINT bool_count);
HRESULT __cdecl wined3d_device_get_ps_consts_f(const struct wined3d_device *device,
@ -2230,7 +2229,8 @@ HRESULT __cdecl wined3d_device_set_material(struct wined3d_device *device, const
void __cdecl wined3d_device_set_multithreaded(struct wined3d_device *device);
HRESULT __cdecl wined3d_device_set_npatch_mode(struct wined3d_device *device, float segments);
HRESULT __cdecl wined3d_device_set_pixel_shader(struct wined3d_device *device, struct wined3d_shader *shader);
void __cdecl wined3d_device_set_primitive_type(struct wined3d_device *device, WINED3DPRIMITIVETYPE primitive_topology);
void __cdecl wined3d_device_set_primitive_type(struct wined3d_device *device,
enum wined3d_primitive_type primitive_topology);
HRESULT __cdecl wined3d_device_set_ps_consts_b(struct wined3d_device *device,
UINT start_register, const BOOL *constants, UINT bool_count);
HRESULT __cdecl wined3d_device_set_ps_consts_f(struct wined3d_device *device,