wined3d: Map D3DSIO_DEF to it's GLSL generating function for vertex shaders

Jason Green jave27 at gmail.com
Fri Jun 9 11:50:34 CDT 2006


This was left out of the previous patchset, but the function was
already implemented.

With this patch, the following demo works using GLSL:
http://www.codesampler.com/dx9src/dx9src_9.htm#dx9_cg_anisotropic_lighting

You need NVidia's Cg Toolkit installed to use it, though.
-------------- next part --------------
diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c
index 6215aa4..a339f9c 100644
--- a/dlls/wined3d/vertexshader.c
+++ b/dlls/wined3d/vertexshader.c
@@ -542,7 +542,7 @@ CONST SHADER_OPCODE IWineD3DVertexShader
     {D3DSIO_DCL,      "dcl",      NULL,                  2, vshader_dcl,     vshader_hw_dcl, NULL, 0, 0},
 
     /* Constant definitions */
-    {D3DSIO_DEF,      "def",      NULL,                  5, vshader_def,     shader_hw_def, NULL, 0, 0},
+    {D3DSIO_DEF,      "def",      NULL,                  5, vshader_def,     shader_hw_def, shader_glsl_def, 0, 0},
     {D3DSIO_DEFB,     "defb",     GLNAME_REQUIRE_GLSL,   2, vshader_defb,    NULL, NULL, 0, 0},
     {D3DSIO_DEFI,     "defi",     GLNAME_REQUIRE_GLSL,   5, vshader_defi,    NULL, NULL, 0, 0},
 


More information about the wine-patches mailing list