Make codesampler texture addressing mode sample work better.

Add mirrorsupport (if opengl 1.3) and make clamp and border appear
more similar to Windows.
This commit is contained in:
Jason Edmeades 2003-04-19 20:08:14 +00:00 committed by Alexandre Julliard
parent 381e64758b
commit 2a7f46d0b4
1 changed files with 9 additions and 5 deletions

View File

@ -3446,11 +3446,15 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
GLint wrapParm = GL_REPEAT;
switch (Value) {
case D3DTADDRESS_WRAP: wrapParm = GL_REPEAT; break;
case D3DTADDRESS_CLAMP: wrapParm = GL_CLAMP; break;
case D3DTADDRESS_BORDER: wrapParm = GL_CLAMP_TO_EDGE; break;
case D3DTADDRESS_MIRROR: /* Unsupported in OpenGL? */
case D3DTADDRESS_MIRRORONCE: /* Unsupported in OpenGL? */
case D3DTADDRESS_CLAMP: wrapParm = GL_CLAMP_TO_EDGE; break;
case D3DTADDRESS_BORDER: wrapParm = GL_REPEAT; break; /* FIXME: Not right, but better */
#if defined(GL_VERSION_1_3)
case D3DTADDRESS_MIRROR: wrapParm = GL_MIRRORED_REPEAT_ARB; break;
case D3DTADDRESS_MIRRORONCE: /* Unsupported in OpenGL but pretent mirror */
#else
case D3DTADDRESS_MIRROR: /* Unsupported in OpenGL pre-1.4 */
case D3DTADDRESS_MIRRORONCE: /* Unsupported in OpenGL */
#endif
default:
FIXME("Unrecognized or unsupported D3DTADDRESS_* value %ld, state %d\n", Value, Type);
wrapParm = GL_REPEAT;