Added fog attribute to GLSL profile. trunk
authorRyan C. Gordon <icculus@icculus.org>
Sat, 05 Apr 2008 18:38:48 -0400
branchtrunk
changeset 105 0f739e340f30
parent 104 7019f99f17d0
child 106 fd0370e31e86
Added fog attribute to GLSL profile. I think this is right...
mojoshader.c
--- a/mojoshader.c	Sat Apr 05 16:33:33 2008 -0400
+++ b/mojoshader.c	Sat Apr 05 18:38:48 2008 -0400
@@ -1785,7 +1785,11 @@
                     else if (index == 1)
                         usage_str = "gl_FrontSecondaryColor";
                     break;
+                case MOJOSHADER_USAGE_FOG:
+                    usage_str = "gl_FogFragCoord";
+                    break;
                 case MOJOSHADER_USAGE_TEXCOORD:
+                    snprintf(index_str, sizeof (index_str), "%u", (uint) index);
                     usage_str = "gl_TexCoord";
                     arrayleft = "[";
                     arrayright = "]";