[D3D 19] Some new RenderState support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog
 Add support for the TextureAddress render state.

-- 
		 Lionel Ulmer - http://www.bbrox.org/
Index: dlls/ddraw/mesa.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/mesa.c,v
retrieving revision 1.12
diff -u -r1.12 mesa.c
--- dlls/ddraw/mesa.c	15 Dec 2002 01:18:00 -0000	1.12
+++ dlls/ddraw/mesa.c	15 Dec 2002 11:16:33 -0000
@@ -66,6 +66,24 @@
 		}
 	    } break;
 
+	    case D3DRENDERSTATE_TEXTUREADDRESSU:
+	    case D3DRENDERSTATE_TEXTUREADDRESSV:
+	    case D3DRENDERSTATE_TEXTUREADDRESS: { /* 3 */
+	        GLenum arg = GL_REPEAT; /* Default value */
+	        switch ((D3DTEXTUREADDRESS) dwRenderState) {
+		    case D3DTADDRESS_WRAP:   arg = GL_REPEAT; break;
+		    case D3DTADDRESS_CLAMP:  arg = GL_CLAMP; break;
+		    case D3DTADDRESS_BORDER: arg = GL_CLAMP_TO_EDGE; break;
+		    default: ERR("Unhandled TEXTUREADDRESS mode !\n");
+		}
+		if ((dwRenderStateType == D3DRENDERSTATE_TEXTUREADDRESSU) ||
+		    (dwRenderStateType == D3DRENDERSTATE_TEXTUREADDRESS))
+		    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, arg);
+		if ((dwRenderStateType == D3DRENDERSTATE_TEXTUREADDRESSV) ||
+		    (dwRenderStateType == D3DRENDERSTATE_TEXTUREADDRESS))
+		    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, arg);
+	    } break;
+	      
 	    case D3DRENDERSTATE_TEXTUREPERSPECTIVE: /* 4 */
 	        if (dwRenderState)
 		    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux