Expose mtlShaderState to mojoshader_effects.h
authorCaleb Cornett <caleb.cornett@outlook.com>
Fri, 03 Apr 2020 12:40:20 -0400
changeset 1240 ebb2b1e436f2
parent 1239 98ccda2125b1
child 1241 01fea3855ffb
Expose mtlShaderState to mojoshader_effects.h
mojoshader_effects.h
mojoshader_metal.c
--- a/mojoshader_effects.h	Thu Apr 02 15:06:14 2020 -0400
+++ b/mojoshader_effects.h	Fri Apr 03 12:40:20 2020 -0400
@@ -804,7 +804,15 @@
 /* Metal effect interface... */
 
 typedef struct MOJOSHADER_mtlEffect MOJOSHADER_mtlEffect;
-typedef struct MOJOSHADER_mtlShaderState MOJOSHADER_mtlShaderState;
+typedef struct MOJOSHADER_mtlShaderState
+{
+    MOJOSHADER_mtlShader *vertexShader;
+    MOJOSHADER_mtlShader *fragmentShader;
+    void *vertexUniformBuffer; // MTLBuffer*
+    void *fragmentUniformBuffer; // MTLBuffer*
+    int vertexUniformOffset;
+    int fragmentUniformOffset;
+} MOJOSHADER_mtlShaderState;
 
 /* Fully compile/link the shaders found within the effect.
  *
--- a/mojoshader_metal.c	Thu Apr 02 15:06:14 2020 -0400
+++ b/mojoshader_metal.c	Fri Apr 03 12:40:20 2020 -0400
@@ -79,16 +79,6 @@
     int alreadyWritten;
 } MOJOSHADER_mtlUniformBuffer;
 
-typedef struct MOJOSHADER_mtlShaderState
-{
-    MOJOSHADER_mtlShader *vertexShader;
-    MOJOSHADER_mtlShader *fragmentShader;
-    void *vertexUniformBuffer; // MTLBuffer*
-    void *fragmentUniformBuffer; // MTLBuffer*
-    int vertexUniformOffset;
-    int fragmentUniformOffset;
-} MOJOSHADER_mtlShaderState;
-
 /* Objective-C selector references */
 
 static void *classNSString = NULL;