mojoshader_effects.h
changeset 1235 8fd6c5efe453
parent 1229 3ecd29a50d9d
child 1240 ebb2b1e436f2
equal deleted inserted replaced
1234:608cef8fa24d 1235:8fd6c5efe453
   151 
   151 
   152 typedef enum MOJOSHADER_shadeMode
   152 typedef enum MOJOSHADER_shadeMode
   153 {
   153 {
   154     MOJOSHADER_SHADE_FLAT    = 1,
   154     MOJOSHADER_SHADE_FLAT    = 1,
   155     MOJOSHADER_SHADE_GOURAUD = 2,
   155     MOJOSHADER_SHADE_GOURAUD = 2,
   156     MOJOSHADER_SHADE_PHONG   = 3,
   156     MOJOSHADER_SHADE_PHONG   = 3
   157 } MOJOSHADER_shadeMode;
   157 } MOJOSHADER_shadeMode;
   158 
   158 
   159 typedef enum MOJOSHADER_blendMode
   159 typedef enum MOJOSHADER_blendMode
   160 {
   160 {
   161     MOJOSHADER_BLEND_ZERO            = 1,
   161     MOJOSHADER_BLEND_ZERO            = 1,
   228     MOJOSHADER_VBF_DISABLE  = 0,
   228     MOJOSHADER_VBF_DISABLE  = 0,
   229     MOJOSHADER_VBF_1WEIGHTS = 1,
   229     MOJOSHADER_VBF_1WEIGHTS = 1,
   230     MOJOSHADER_VBF_2WEIGHTS = 2,
   230     MOJOSHADER_VBF_2WEIGHTS = 2,
   231     MOJOSHADER_VBF_3WEIGHTS = 3,
   231     MOJOSHADER_VBF_3WEIGHTS = 3,
   232     MOJOSHADER_VBF_TWEENING = 255,
   232     MOJOSHADER_VBF_TWEENING = 255,
   233     MOJOSHADER_VBF_0WEIGHTS = 256,
   233     MOJOSHADER_VBF_0WEIGHTS = 256
   234 } MOJOSHADER_vertexBlendFlags;
   234 } MOJOSHADER_vertexBlendFlags;
   235 
   235 
   236 typedef enum MOJOSHADER_patchedEdgeStyle
   236 typedef enum MOJOSHADER_patchedEdgeStyle
   237 {
   237 {
   238     MOJOSHADER_PATCHEDGE_DISCRETE,
   238     MOJOSHADER_PATCHEDGE_DISCRETE,
   316 {
   316 {
   317     const char *name;
   317     const char *name;
   318     const char *semantic;
   318     const char *semantic;
   319     MOJOSHADER_symbolTypeInfo type;
   319     MOJOSHADER_symbolTypeInfo type;
   320     unsigned int value_count;
   320     unsigned int value_count;
   321     union
   321     MOJOSHADERNAMELESS union
   322     {
   322     {
   323          /* Raw value types */
   323          /* Raw value types */
   324         void                           *values;
   324         void                           *values;
   325         int                            *valuesI;
   325         int                            *valuesI;
   326         float                          *valuesF;
   326         float                          *valuesF;
   405     unsigned int *preshader_params;
   405     unsigned int *preshader_params;
   406     unsigned int param_count;
   406     unsigned int param_count;
   407     unsigned int *params;
   407     unsigned int *params;
   408     unsigned int sampler_count;
   408     unsigned int sampler_count;
   409     MOJOSHADER_samplerStateRegister *samplers;
   409     MOJOSHADER_samplerStateRegister *samplers;
   410     union
   410     MOJOSHADERNAMELESS union
   411     {
   411     {
   412         const MOJOSHADER_parseData *shader;
   412         const MOJOSHADER_parseData *shader;
   413         const MOJOSHADER_preshader *preshader;
   413         const MOJOSHADER_preshader *preshader;
   414     };
   414     };
   415 } MOJOSHADER_effectShader;
   415 } MOJOSHADER_effectShader;
   433 } MOJOSHADER_effectTexture;
   433 } MOJOSHADER_effectTexture;
   434 
   434 
   435 typedef union MOJOSHADER_effectObject
   435 typedef union MOJOSHADER_effectObject
   436 {
   436 {
   437     MOJOSHADER_symbolType type;
   437     MOJOSHADER_symbolType type;
   438     union
   438     MOJOSHADERNAMELESS union
   439     {
   439     {
   440         MOJOSHADER_effectShader shader;
   440         MOJOSHADER_effectShader shader;
   441         MOJOSHADER_effectSamplerMap mapping;
   441         MOJOSHADER_effectSamplerMap mapping;
   442         MOJOSHADER_effectString string;
   442         MOJOSHADER_effectString string;
   443         MOJOSHADER_effectTexture texture;
   443         MOJOSHADER_effectTexture texture;
   802 
   802 
   803 
   803 
   804 /* Metal effect interface... */
   804 /* Metal effect interface... */
   805 
   805 
   806 typedef struct MOJOSHADER_mtlEffect MOJOSHADER_mtlEffect;
   806 typedef struct MOJOSHADER_mtlEffect MOJOSHADER_mtlEffect;
   807 typedef struct MOJOSHADER_mtlShader MOJOSHADER_mtlShader;
       
   808 typedef struct MOJOSHADER_mtlShaderState MOJOSHADER_mtlShaderState;
   807 typedef struct MOJOSHADER_mtlShaderState MOJOSHADER_mtlShaderState;
   809 
   808 
   810 /* Fully compile/link the shaders found within the effect.
   809 /* Fully compile/link the shaders found within the effect.
   811  *
   810  *
   812  * The MOJOSHADER_mtlEffect* is solely for use within the Metal-specific calls.
   811  * The MOJOSHADER_mtlEffect* is solely for use within the Metal-specific calls.