mojoshader.h
changeset 1180 8abc040525ed
parent 1171 9f27482a2f58
equal deleted inserted replaced
1179:6dd73a80629b 1180:8abc040525ed
   239     MOJOSHADER_USAGE_POSITIONT,
   239     MOJOSHADER_USAGE_POSITIONT,
   240     MOJOSHADER_USAGE_COLOR,
   240     MOJOSHADER_USAGE_COLOR,
   241     MOJOSHADER_USAGE_FOG,
   241     MOJOSHADER_USAGE_FOG,
   242     MOJOSHADER_USAGE_DEPTH,
   242     MOJOSHADER_USAGE_DEPTH,
   243     MOJOSHADER_USAGE_SAMPLE,
   243     MOJOSHADER_USAGE_SAMPLE,
   244     MOJOSHADER_USAGE_TOTAL,  /* housekeeping value; never returned. */
   244     MOJOSHADER_USAGE_TOTAL   /* housekeeping value; never returned. */
   245 } MOJOSHADER_usage;
   245 } MOJOSHADER_usage;
   246 
   246 
   247 /*
   247 /*
   248  * These are the attributes to be set for a shader. "Attributes" are what
   248  * These are the attributes to be set for a shader. "Attributes" are what
   249  *  Direct3D calls "Vertex Declarations Usages" ...
   249  *  Direct3D calls "Vertex Declarations Usages" ...
   284  *  debugging and optimization.
   284  *  debugging and optimization.
   285  */
   285  */
   286 
   286 
   287 typedef enum
   287 typedef enum
   288 {
   288 {
   289     MOJOSHADER_SYMREGSET_BOOL,
   289     MOJOSHADER_SYMREGSET_BOOL=0,
   290     MOJOSHADER_SYMREGSET_INT4,
   290     MOJOSHADER_SYMREGSET_INT4,
   291     MOJOSHADER_SYMREGSET_FLOAT4,
   291     MOJOSHADER_SYMREGSET_FLOAT4,
   292     MOJOSHADER_SYMREGSET_SAMPLER,
   292     MOJOSHADER_SYMREGSET_SAMPLER,
       
   293     MOJOSHADER_SYMREGSET_TOTAL    /* housekeeping value; never returned. */
   293 } MOJOSHADER_symbolRegisterSet;
   294 } MOJOSHADER_symbolRegisterSet;
   294 
   295 
   295 typedef enum
   296 typedef enum
   296 {
   297 {
   297     MOJOSHADER_SYMCLASS_SCALAR,
   298     MOJOSHADER_SYMCLASS_SCALAR=0,
   298     MOJOSHADER_SYMCLASS_VECTOR,
   299     MOJOSHADER_SYMCLASS_VECTOR,
   299     MOJOSHADER_SYMCLASS_MATRIX_ROWS,
   300     MOJOSHADER_SYMCLASS_MATRIX_ROWS,
   300     MOJOSHADER_SYMCLASS_MATRIX_COLUMNS,
   301     MOJOSHADER_SYMCLASS_MATRIX_COLUMNS,
   301     MOJOSHADER_SYMCLASS_OBJECT,
   302     MOJOSHADER_SYMCLASS_OBJECT,
   302     MOJOSHADER_SYMCLASS_STRUCT,
   303     MOJOSHADER_SYMCLASS_STRUCT,
       
   304     MOJOSHADER_SYMCLASS_TOTAL    /* housekeeping value; never returned. */
   303 } MOJOSHADER_symbolClass;
   305 } MOJOSHADER_symbolClass;
   304 
   306 
   305 typedef enum
   307 typedef enum
   306 {
   308 {
   307     MOJOSHADER_SYMTYPE_VOID,
   309     MOJOSHADER_SYMTYPE_VOID=0,
   308     MOJOSHADER_SYMTYPE_BOOL,
   310     MOJOSHADER_SYMTYPE_BOOL,
   309     MOJOSHADER_SYMTYPE_INT,
   311     MOJOSHADER_SYMTYPE_INT,
   310     MOJOSHADER_SYMTYPE_FLOAT,
   312     MOJOSHADER_SYMTYPE_FLOAT,
   311     MOJOSHADER_SYMTYPE_STRING,
   313     MOJOSHADER_SYMTYPE_STRING,
   312     MOJOSHADER_SYMTYPE_TEXTURE,
   314     MOJOSHADER_SYMTYPE_TEXTURE,
   322     MOJOSHADER_SYMTYPE_PIXELSHADER,
   324     MOJOSHADER_SYMTYPE_PIXELSHADER,
   323     MOJOSHADER_SYMTYPE_VERTEXSHADER,
   325     MOJOSHADER_SYMTYPE_VERTEXSHADER,
   324     MOJOSHADER_SYMTYPE_PIXELFRAGMENT,
   326     MOJOSHADER_SYMTYPE_PIXELFRAGMENT,
   325     MOJOSHADER_SYMTYPE_VERTEXFRAGMENT,
   327     MOJOSHADER_SYMTYPE_VERTEXFRAGMENT,
   326     MOJOSHADER_SYMTYPE_UNSUPPORTED,
   328     MOJOSHADER_SYMTYPE_UNSUPPORTED,
       
   329     MOJOSHADER_SYMTYPE_TOTAL    /* housekeeping value; never returned. */
   327 } MOJOSHADER_symbolType;
   330 } MOJOSHADER_symbolType;
   328 
   331 
   329 typedef struct MOJOSHADER_symbolStructMember MOJOSHADER_symbolStructMember;
   332 typedef struct MOJOSHADER_symbolStructMember MOJOSHADER_symbolStructMember;
   330 
   333 
   331 typedef struct MOJOSHADER_symbolTypeInfo
   334 typedef struct MOJOSHADER_symbolTypeInfo