mojoshader.h
branchtrunk
changeset 92 bc1bb138e855
parent 46 ff5a0ec44f00
child 94 57adfb4769a0
--- a/mojoshader.h	Fri Apr 04 08:53:43 2008 -0400
+++ b/mojoshader.h	Fri Apr 04 09:45:04 2008 -0400
@@ -46,6 +46,20 @@
     MOJOSHADER_TYPE_ANY = 0xFFFFFFFF   /* used for bitmasks */
 } MOJOSHADER_shaderType;
 
+typedef enum
+{
+    MOJOSHADER_UNIFORM_FLOAT,
+    MOJOSHADER_UNIFORM_INT,
+    MOJOSHADER_UNIFORM_BOOL
+} MOJOSHADER_uniform_type;
+
+typedef struct
+{
+    int index;
+    const char *name;
+    MOJOSHADER_uniform_type type;
+} MOJOSHADER_uniform;
+
 
 /*
  * Structure used to return data from parsing of a shader...
@@ -99,6 +113,18 @@
     int minor_ver;
 
     /*
+     * The number of elements pointed to by (uniforms).
+     */
+    int uniform_count;
+
+    /*
+     * (uniform_count) elements of data on how to access uniforms to be
+     *  set by this shader. "Uniforms" are what Direct3D calls "Constants" ...
+     *  IDirect3DDevice::SetVertexShaderConstantF() would need this data.
+     */
+    MOJOSHADER_uniform *uniforms;
+
+    /*
      * This is the malloc implementation you passed to MOJOSHADER_parse().
      */
     MOJOSHADER_malloc malloc;