Removed comment output at top of program in GLSL profile. trunk
authorRyan C. Gordon <icculus@icculus.org>
Thu, 03 Apr 2008 10:01:31 -0400
branchtrunk
changeset 79 36a3467c235d
parent 78 85edee5f0359
child 80 1aacf1be7095
Removed comment output at top of program in GLSL profile.
mojoshader.c
--- a/mojoshader.c	Thu Apr 03 09:58:16 2008 -0400
+++ b/mojoshader.c	Thu Apr 03 10:01:31 2008 -0400
@@ -1477,19 +1477,18 @@
 
 static void emit_GLSL_start(Context *ctx)
 {
-    const uint major = (uint) ctx->major_ver;
-    const uint minor = (uint) ctx->minor_ver;
-
     ctx->output = &ctx->globals;
-    if (ctx->shader_type == MOJOSHADER_TYPE_PIXEL)
-        output_line(ctx, "// Pixel shader, version %u.%u", major, minor);
-    else if (ctx->shader_type == MOJOSHADER_TYPE_VERTEX)
-        output_line(ctx, "// Vertex shader, version %u.%u", major, minor);
-    else
+    switch (ctx->shader_type)
     {
-        failf(ctx, "Shader type %u unsupported in this profile.",
-              (uint) ctx->shader_type);
-    } // else
+        case MOJOSHADER_TYPE_PIXEL:
+        case MOJOSHADER_TYPE_VERTEX:
+            break;  // supported.
+
+        default:
+            failf(ctx, "Shader type %u unsupported in this profile.",
+                  (uint) ctx->shader_type);
+            return;
+    } // switch
 
     ctx->output = &ctx->mainline;
     output_line(ctx, "void main()");