mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
wined3d: Get rid of the WINED3DTEXTUREADDRESS typedef.
This commit is contained in:
parent
b6431d9493
commit
2650ba4b17
@ -2809,13 +2809,13 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
|
||||
device = wined3d_guess_card(gl_info, gl_renderer_str, &gl_vendor, &card_vendor);
|
||||
TRACE_(d3d_caps)("FOUND (fake) card: 0x%x (vendor id), 0x%x (device id)\n", card_vendor, device);
|
||||
|
||||
gl_info->wrap_lookup[WINED3DTADDRESS_WRAP - WINED3DTADDRESS_WRAP] = GL_REPEAT;
|
||||
gl_info->wrap_lookup[WINED3DTADDRESS_MIRROR - WINED3DTADDRESS_WRAP] =
|
||||
gl_info->wrap_lookup[WINED3D_TADDRESS_WRAP - WINED3D_TADDRESS_WRAP] = GL_REPEAT;
|
||||
gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR - WINED3D_TADDRESS_WRAP] =
|
||||
gl_info->supported[ARB_TEXTURE_MIRRORED_REPEAT] ? GL_MIRRORED_REPEAT_ARB : GL_REPEAT;
|
||||
gl_info->wrap_lookup[WINED3DTADDRESS_CLAMP - WINED3DTADDRESS_WRAP] = GL_CLAMP_TO_EDGE;
|
||||
gl_info->wrap_lookup[WINED3DTADDRESS_BORDER - WINED3DTADDRESS_WRAP] =
|
||||
gl_info->wrap_lookup[WINED3D_TADDRESS_CLAMP - WINED3D_TADDRESS_WRAP] = GL_CLAMP_TO_EDGE;
|
||||
gl_info->wrap_lookup[WINED3D_TADDRESS_BORDER - WINED3D_TADDRESS_WRAP] =
|
||||
gl_info->supported[ARB_TEXTURE_BORDER_CLAMP] ? GL_CLAMP_TO_BORDER_ARB : GL_REPEAT;
|
||||
gl_info->wrap_lookup[WINED3DTADDRESS_MIRRORONCE - WINED3DTADDRESS_WRAP] =
|
||||
gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP] =
|
||||
gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] ? GL_MIRROR_CLAMP_TO_EDGE_ATI : GL_REPEAT;
|
||||
|
||||
/* Make sure there's an active HDC else the WGL extensions will fail */
|
||||
|
@ -1278,9 +1278,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
|
||||
for (i = 0 ; i < MAX_COMBINED_SAMPLERS; ++i)
|
||||
{
|
||||
TRACE("Setting up default samplers states for sampler %u.\n", i);
|
||||
state->sampler_states[i][WINED3D_SAMP_ADDRESS_U] = WINED3DTADDRESS_WRAP;
|
||||
state->sampler_states[i][WINED3D_SAMP_ADDRESS_V] = WINED3DTADDRESS_WRAP;
|
||||
state->sampler_states[i][WINED3D_SAMP_ADDRESS_W] = WINED3DTADDRESS_WRAP;
|
||||
state->sampler_states[i][WINED3D_SAMP_ADDRESS_U] = WINED3D_TADDRESS_WRAP;
|
||||
state->sampler_states[i][WINED3D_SAMP_ADDRESS_V] = WINED3D_TADDRESS_WRAP;
|
||||
state->sampler_states[i][WINED3D_SAMP_ADDRESS_W] = WINED3D_TADDRESS_WRAP;
|
||||
state->sampler_states[i][WINED3D_SAMP_BORDER_COLOR] = 0;
|
||||
state->sampler_states[i][WINED3D_SAMP_MAG_FILTER] = WINED3DTEXF_POINT;
|
||||
state->sampler_states[i][WINED3D_SAMP_MIN_FILTER] = WINED3DTEXF_POINT;
|
||||
|
@ -167,9 +167,9 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
}
|
||||
/* Initialise the state of the texture object to the OpenGL defaults,
|
||||
* not the D3D defaults. */
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSU] = WINED3DTADDRESS_WRAP;
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSV] = WINED3DTADDRESS_WRAP;
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSW] = WINED3DTADDRESS_WRAP;
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSU] = WINED3D_TADDRESS_WRAP;
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSV] = WINED3D_TADDRESS_WRAP;
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSW] = WINED3D_TADDRESS_WRAP;
|
||||
gl_tex->states[WINED3DTEXSTA_BORDERCOLOR] = 0;
|
||||
gl_tex->states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_LINEAR;
|
||||
gl_tex->states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; /* GL_NEAREST_MIPMAP_LINEAR */
|
||||
@ -237,22 +237,22 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
|
||||
/* GL locking is done by the caller */
|
||||
static void apply_wrap(const struct wined3d_gl_info *gl_info, GLenum target,
|
||||
WINED3DTEXTUREADDRESS d3d_wrap, GLenum param, BOOL cond_np2)
|
||||
enum wined3d_texture_address d3d_wrap, GLenum param, BOOL cond_np2)
|
||||
{
|
||||
GLint gl_wrap;
|
||||
|
||||
if (d3d_wrap < WINED3DTADDRESS_WRAP || d3d_wrap > WINED3DTADDRESS_MIRRORONCE)
|
||||
if (d3d_wrap < WINED3D_TADDRESS_WRAP || d3d_wrap > WINED3D_TADDRESS_MIRROR_ONCE)
|
||||
{
|
||||
FIXME("Unrecognized or unsupported WINED3DTEXTUREADDRESS %#x.\n", d3d_wrap);
|
||||
FIXME("Unrecognized or unsupported texture address mode %#x.\n", d3d_wrap);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Cubemaps are always set to clamp, regardless of the sampler state. */
|
||||
if (target == GL_TEXTURE_CUBE_MAP_ARB
|
||||
|| (cond_np2 && d3d_wrap == WINED3DTADDRESS_WRAP))
|
||||
|| (cond_np2 && d3d_wrap == WINED3D_TADDRESS_WRAP))
|
||||
gl_wrap = GL_CLAMP_TO_EDGE;
|
||||
else
|
||||
gl_wrap = gl_info->wrap_lookup[d3d_wrap - WINED3DTADDRESS_WRAP];
|
||||
gl_wrap = gl_info->wrap_lookup[d3d_wrap - WINED3D_TADDRESS_WRAP];
|
||||
|
||||
TRACE("Setting param %#x to %#x for target %#x.\n", param, gl_wrap, target);
|
||||
glTexParameteri(target, param, gl_wrap);
|
||||
@ -635,8 +635,8 @@ static HRESULT texture2d_bind(struct wined3d_texture *texture,
|
||||
glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
checkGLcall("glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST)");
|
||||
LEAVE_GL();
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSU] = WINED3DTADDRESS_CLAMP;
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSV] = WINED3DTADDRESS_CLAMP;
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSU] = WINED3D_TADDRESS_CLAMP;
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSV] = WINED3D_TADDRESS_CLAMP;
|
||||
gl_tex->states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT;
|
||||
gl_tex->states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT;
|
||||
gl_tex->states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE;
|
||||
|
@ -1519,7 +1519,7 @@ struct wined3d_gl_info
|
||||
DWORD reserved_glsl_constants;
|
||||
DWORD quirks;
|
||||
BOOL supported[WINED3D_GL_EXT_COUNT];
|
||||
GLint wrap_lookup[WINED3DTADDRESS_MIRRORONCE - WINED3DTADDRESS_WRAP + 1];
|
||||
GLint wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP + 1];
|
||||
|
||||
struct wined3d_fbo_ops fbo_ops;
|
||||
#define USE_GL_FUNC(type, pfn, ext, replace) type pfn;
|
||||
|
@ -612,15 +612,14 @@ enum wined3d_texture_op
|
||||
WINED3D_TOP_LERP = 26,
|
||||
};
|
||||
|
||||
typedef enum _WINED3DTEXTUREADDRESS
|
||||
enum wined3d_texture_address
|
||||
{
|
||||
WINED3DTADDRESS_WRAP = 1,
|
||||
WINED3DTADDRESS_MIRROR = 2,
|
||||
WINED3DTADDRESS_CLAMP = 3,
|
||||
WINED3DTADDRESS_BORDER = 4,
|
||||
WINED3DTADDRESS_MIRRORONCE = 5,
|
||||
WINED3DTADDRESS_FORCE_DWORD = 0x7fffffff
|
||||
} WINED3DTEXTUREADDRESS;
|
||||
WINED3D_TADDRESS_WRAP = 1,
|
||||
WINED3D_TADDRESS_MIRROR = 2,
|
||||
WINED3D_TADDRESS_CLAMP = 3,
|
||||
WINED3D_TADDRESS_BORDER = 4,
|
||||
WINED3D_TADDRESS_MIRROR_ONCE = 5,
|
||||
};
|
||||
|
||||
typedef enum _WINED3DTRANSFORMSTATETYPE
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user