Patched to compile when built as C++ code. trunk
authorRyan C. Gordon <icculus@icculus.org>
Tue, 06 May 2008 00:30:44 -0400
branchtrunk
changeset 285 5e7d6cf65f1e
parent 284 ea52f9707795
child 286 902428e570b0
Patched to compile when built as C++ code.
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Tue May 06 00:26:59 2008 -0400
+++ b/mojoshader_opengl.c	Tue May 06 00:30:44 2008 -0400
@@ -619,6 +619,7 @@
     MOJOSHADER_glProgram *retval = NULL;
     const GLhandleARB program = ctx->glCreateProgramObject();
     int numregs = 0;
+    uint32 const_count = 0;
 
     if (vshader != NULL) ctx->glAttachObject(program, vshader->handle);
     if (pshader != NULL) ctx->glAttachObject(program, pshader->handle);
@@ -660,8 +661,6 @@
     retval->fragment = pshader;
     retval->refcount = 1;
 
-    uint32 const_count = 0;
-
     if (vshader != NULL)
     {
         if (const_count < vshader->parseData->constant_count)