| 1 | /** |
| 2 | * MojoShader; generate shader programs from bytecode of compiled |
| 3 | * Direct3D shaders. |
| 4 | * |
| 5 | * Please see the file LICENSE.txt in the source's root directory. |
| 6 | * |
| 7 | * This file written by Ryan C. Gordon. |
| 8 | */ |
| 9 | |
| 10 | #ifndef MOJOSHADER_EFFECTS_H |
| 11 | #define MOJOSHADER_EFFECTS_Hcxx . . $ `mojoshader_effects.h:11:9`! |
| 12 | |
| 13 | #ifdef MOJOSHADER_EFFECT_SUPPORTcxx . . $ `<built-in>:411:9`! |
| 14 | |
| 15 | /* MOJOSHADER_effectState types... */ |
| 16 | |
| 17 | typedef enum MOJOSHADER_renderStateTypecxx . . $ MOJOSHADER_renderStateType# |
| 18 | { |
| 19 | /* Note that we are NOT using the actual RS values from D3D here. |
| 20 | * For some reason, in the binary data, it's 0-based. |
| 21 | * Even worse, it doesn't even seem to be in order. |
| 22 | * Here is the list of changes compared to the real D3DRS enum: |
| 23 | * - All of the RS_WRAP values are in a row, not separate! |
| 24 | * |
| 25 | * -flibit |
| 26 | */ |
| 27 | MOJOSHADER_RS_ZENABLEcxx . . $ MOJOSHADER_RS_ZENABLE., |
| 28 | MOJOSHADER_RS_FILLMODEcxx . . $ MOJOSHADER_RS_FILLMODE., |
| 29 | MOJOSHADER_RS_SHADEMODEcxx . . $ MOJOSHADER_RS_SHADEMODE., |
| 30 | MOJOSHADER_RS_ZWRITEENABLEcxx . . $ MOJOSHADER_RS_ZWRITEENABLE., |
| 31 | MOJOSHADER_RS_ALPHATESTENABLEcxx . . $ MOJOSHADER_RS_ALPHATESTENABLE., |
| 32 | MOJOSHADER_RS_LASTPIXELcxx . . $ MOJOSHADER_RS_LASTPIXEL., |
| 33 | MOJOSHADER_RS_SRCBLENDcxx . . $ MOJOSHADER_RS_SRCBLEND., |
| 34 | MOJOSHADER_RS_DESTBLENDcxx . . $ MOJOSHADER_RS_DESTBLEND., |
| 35 | MOJOSHADER_RS_CULLMODEcxx . . $ MOJOSHADER_RS_CULLMODE., |
| 36 | MOJOSHADER_RS_ZFUNCcxx . . $ MOJOSHADER_RS_ZFUNC., |
| 37 | MOJOSHADER_RS_ALPHAREFcxx . . $ MOJOSHADER_RS_ALPHAREF., |
| 38 | MOJOSHADER_RS_ALPHAFUNCcxx . . $ MOJOSHADER_RS_ALPHAFUNC., |
| 39 | MOJOSHADER_RS_DITHERENABLEcxx . . $ MOJOSHADER_RS_DITHERENABLE., |
| 40 | MOJOSHADER_RS_ALPHABLENDENABLEcxx . . $ MOJOSHADER_RS_ALPHABLENDENABLE., |
| 41 | MOJOSHADER_RS_FOGENABLEcxx . . $ MOJOSHADER_RS_FOGENABLE., |
| 42 | MOJOSHADER_RS_SPECULARENABLEcxx . . $ MOJOSHADER_RS_SPECULARENABLE., |
| 43 | MOJOSHADER_RS_FOGCOLORcxx . . $ MOJOSHADER_RS_FOGCOLOR., |
| 44 | MOJOSHADER_RS_FOGTABLEMODEcxx . . $ MOJOSHADER_RS_FOGTABLEMODE., |
| 45 | MOJOSHADER_RS_FOGSTARTcxx . . $ MOJOSHADER_RS_FOGSTART., |
| 46 | MOJOSHADER_RS_FOGENDcxx . . $ MOJOSHADER_RS_FOGEND., |
| 47 | MOJOSHADER_RS_FOGDENSITYcxx . . $ MOJOSHADER_RS_FOGDENSITY., |
| 48 | MOJOSHADER_RS_RANGEFOGENABLEcxx . . $ MOJOSHADER_RS_RANGEFOGENABLE., |
| 49 | MOJOSHADER_RS_STENCILENABLEcxx . . $ MOJOSHADER_RS_STENCILENABLE., |
| 50 | MOJOSHADER_RS_STENCILFAILcxx . . $ MOJOSHADER_RS_STENCILFAIL., |
| 51 | MOJOSHADER_RS_STENCILZFAILcxx . . $ MOJOSHADER_RS_STENCILZFAIL., |
| 52 | MOJOSHADER_RS_STENCILPASScxx . . $ MOJOSHADER_RS_STENCILPASS., |
| 53 | MOJOSHADER_RS_STENCILFUNCcxx . . $ MOJOSHADER_RS_STENCILFUNC., |
| 54 | MOJOSHADER_RS_STENCILREFcxx . . $ MOJOSHADER_RS_STENCILREF., |
| 55 | MOJOSHADER_RS_STENCILMASKcxx . . $ MOJOSHADER_RS_STENCILMASK., |
| 56 | MOJOSHADER_RS_STENCILWRITEMASKcxx . . $ MOJOSHADER_RS_STENCILWRITEMASK., |
| 57 | MOJOSHADER_RS_TEXTUREFACTORcxx . . $ MOJOSHADER_RS_TEXTUREFACTOR., |
| 58 | MOJOSHADER_RS_WRAP0cxx . . $ MOJOSHADER_RS_WRAP0., |
| 59 | MOJOSHADER_RS_WRAP1cxx . . $ MOJOSHADER_RS_WRAP1., |
| 60 | MOJOSHADER_RS_WRAP2cxx . . $ MOJOSHADER_RS_WRAP2., |
| 61 | MOJOSHADER_RS_WRAP3cxx . . $ MOJOSHADER_RS_WRAP3., |
| 62 | MOJOSHADER_RS_WRAP4cxx . . $ MOJOSHADER_RS_WRAP4., |
| 63 | MOJOSHADER_RS_WRAP5cxx . . $ MOJOSHADER_RS_WRAP5., |
| 64 | MOJOSHADER_RS_WRAP6cxx . . $ MOJOSHADER_RS_WRAP6., |
| 65 | MOJOSHADER_RS_WRAP7cxx . . $ MOJOSHADER_RS_WRAP7., |
| 66 | MOJOSHADER_RS_WRAP8cxx . . $ MOJOSHADER_RS_WRAP8., |
| 67 | MOJOSHADER_RS_WRAP9cxx . . $ MOJOSHADER_RS_WRAP9., |
| 68 | MOJOSHADER_RS_WRAP10cxx . . $ MOJOSHADER_RS_WRAP10., |
| 69 | MOJOSHADER_RS_WRAP11cxx . . $ MOJOSHADER_RS_WRAP11., |
| 70 | MOJOSHADER_RS_WRAP12cxx . . $ MOJOSHADER_RS_WRAP12., |
| 71 | MOJOSHADER_RS_WRAP13cxx . . $ MOJOSHADER_RS_WRAP13., |
| 72 | MOJOSHADER_RS_WRAP14cxx . . $ MOJOSHADER_RS_WRAP14., |
| 73 | MOJOSHADER_RS_WRAP15cxx . . $ MOJOSHADER_RS_WRAP15., |
| 74 | MOJOSHADER_RS_CLIPPINGcxx . . $ MOJOSHADER_RS_CLIPPING., |
| 75 | MOJOSHADER_RS_LIGHTINGcxx . . $ MOJOSHADER_RS_LIGHTING., |
| 76 | MOJOSHADER_RS_AMBIENTcxx . . $ MOJOSHADER_RS_AMBIENT., |
| 77 | MOJOSHADER_RS_FOGVERTEXMODEcxx . . $ MOJOSHADER_RS_FOGVERTEXMODE., |
| 78 | MOJOSHADER_RS_COLORVERTEXcxx . . $ MOJOSHADER_RS_COLORVERTEX., |
| 79 | MOJOSHADER_RS_LOCALVIEWERcxx . . $ MOJOSHADER_RS_LOCALVIEWER., |
| 80 | MOJOSHADER_RS_NORMALIZENORMALScxx . . $ MOJOSHADER_RS_NORMALIZENORMALS., |
| 81 | MOJOSHADER_RS_DIFFUSEMATERIALSOURCEcxx . . $ MOJOSHADER_RS_DIFFUSEMATERIALSOURCE., |
| 82 | MOJOSHADER_RS_SPECULARMATERIALSOURCEcxx . . $ MOJOSHADER_RS_SPECULARMATERIALSOURCE., |
| 83 | MOJOSHADER_RS_AMBIENTMATERIALSOURCEcxx . . $ MOJOSHADER_RS_AMBIENTMATERIALSOURCE., |
| 84 | MOJOSHADER_RS_EMISSIVEMATERIALSOURCEcxx . . $ MOJOSHADER_RS_EMISSIVEMATERIALSOURCE., |
| 85 | MOJOSHADER_RS_VERTEXBLENDcxx . . $ MOJOSHADER_RS_VERTEXBLEND., |
| 86 | MOJOSHADER_RS_CLIPPLANEENABLEcxx . . $ MOJOSHADER_RS_CLIPPLANEENABLE., |
| 87 | MOJOSHADER_RS_POINTSIZEcxx . . $ MOJOSHADER_RS_POINTSIZE., |
| 88 | MOJOSHADER_RS_POINTSIZE_MINcxx . . $ MOJOSHADER_RS_POINTSIZE_MIN., |
| 89 | MOJOSHADER_RS_POINTSPRITEENABLEcxx . . $ MOJOSHADER_RS_POINTSPRITEENABLE., |
| 90 | MOJOSHADER_RS_POINTSCALEENABLEcxx . . $ MOJOSHADER_RS_POINTSCALEENABLE., |
| 91 | MOJOSHADER_RS_POINTSCALE_Acxx . . $ MOJOSHADER_RS_POINTSCALE_A., |
| 92 | MOJOSHADER_RS_POINTSCALE_Bcxx . . $ MOJOSHADER_RS_POINTSCALE_B., |
| 93 | MOJOSHADER_RS_POINTSCALE_Ccxx . . $ MOJOSHADER_RS_POINTSCALE_C., |
| 94 | MOJOSHADER_RS_MULTISAMPLEANTIALIAScxx . . $ MOJOSHADER_RS_MULTISAMPLEANTIALIAS., |
| 95 | MOJOSHADER_RS_MULTISAMPLEMASKcxx . . $ MOJOSHADER_RS_MULTISAMPLEMASK., |
| 96 | MOJOSHADER_RS_PATCHEDGESTYLEcxx . . $ MOJOSHADER_RS_PATCHEDGESTYLE., |
| 97 | MOJOSHADER_RS_DEBUGMONITORTOKENcxx . . $ MOJOSHADER_RS_DEBUGMONITORTOKEN., |
| 98 | MOJOSHADER_RS_POINTSIZE_MAXcxx . . $ MOJOSHADER_RS_POINTSIZE_MAX., |
| 99 | MOJOSHADER_RS_INDEXEDVERTEXBLENDENABLEcxx . . $ MOJOSHADER_RS_INDEXEDVERTEXBLENDENABLE., |
| 100 | MOJOSHADER_RS_COLORWRITEENABLEcxx . . $ MOJOSHADER_RS_COLORWRITEENABLE., |
| 101 | MOJOSHADER_RS_TWEENFACTORcxx . . $ MOJOSHADER_RS_TWEENFACTOR., |
| 102 | MOJOSHADER_RS_BLENDOPcxx . . $ MOJOSHADER_RS_BLENDOP., |
| 103 | MOJOSHADER_RS_POSITIONDEGREEcxx . . $ MOJOSHADER_RS_POSITIONDEGREE., |
| 104 | MOJOSHADER_RS_NORMALDEGREEcxx . . $ MOJOSHADER_RS_NORMALDEGREE., |
| 105 | MOJOSHADER_RS_SCISSORTESTENABLEcxx . . $ MOJOSHADER_RS_SCISSORTESTENABLE., |
| 106 | MOJOSHADER_RS_SLOPESCALEDEPTHBIAScxx . . $ MOJOSHADER_RS_SLOPESCALEDEPTHBIAS., |
| 107 | MOJOSHADER_RS_ANTIALIASEDLINEENABLEcxx . . $ MOJOSHADER_RS_ANTIALIASEDLINEENABLE., |
| 108 | MOJOSHADER_RS_MINTESSELLATIONLEVELcxx . . $ MOJOSHADER_RS_MINTESSELLATIONLEVEL., |
| 109 | MOJOSHADER_RS_MAXTESSELLATIONLEVELcxx . . $ MOJOSHADER_RS_MAXTESSELLATIONLEVEL., |
| 110 | MOJOSHADER_RS_ADAPTIVETESS_Xcxx . . $ MOJOSHADER_RS_ADAPTIVETESS_X., |
| 111 | MOJOSHADER_RS_ADAPTIVETESS_Ycxx . . $ MOJOSHADER_RS_ADAPTIVETESS_Y., |
| 112 | MOJOSHADER_RS_ADAPTIVETESS_Zcxx . . $ MOJOSHADER_RS_ADAPTIVETESS_Z., |
| 113 | MOJOSHADER_RS_ADAPTIVETESS_Wcxx . . $ MOJOSHADER_RS_ADAPTIVETESS_W., |
| 114 | MOJOSHADER_RS_ENABLEADAPTIVETESSELLATIONcxx . . $ MOJOSHADER_RS_ENABLEADAPTIVETESSELLATION., |
| 115 | MOJOSHADER_RS_TWOSIDEDSTENCILMODEcxx . . $ MOJOSHADER_RS_TWOSIDEDSTENCILMODE., |
| 116 | MOJOSHADER_RS_CCW_STENCILFAILcxx . . $ MOJOSHADER_RS_CCW_STENCILFAIL., |
| 117 | MOJOSHADER_RS_CCW_STENCILZFAILcxx . . $ MOJOSHADER_RS_CCW_STENCILZFAIL., |
| 118 | MOJOSHADER_RS_CCW_STENCILPASScxx . . $ MOJOSHADER_RS_CCW_STENCILPASS., |
| 119 | MOJOSHADER_RS_CCW_STENCILFUNCcxx . . $ MOJOSHADER_RS_CCW_STENCILFUNC., |
| 120 | MOJOSHADER_RS_COLORWRITEENABLE1cxx . . $ MOJOSHADER_RS_COLORWRITEENABLE1., |
| 121 | MOJOSHADER_RS_COLORWRITEENABLE2cxx . . $ MOJOSHADER_RS_COLORWRITEENABLE2., |
| 122 | MOJOSHADER_RS_COLORWRITEENABLE3cxx . . $ MOJOSHADER_RS_COLORWRITEENABLE3., |
| 123 | MOJOSHADER_RS_BLENDFACTORcxx . . $ MOJOSHADER_RS_BLENDFACTOR., |
| 124 | MOJOSHADER_RS_SRGBWRITEENABLEcxx . . $ MOJOSHADER_RS_SRGBWRITEENABLE., |
| 125 | MOJOSHADER_RS_DEPTHBIAScxx . . $ MOJOSHADER_RS_DEPTHBIAS., |
| 126 | MOJOSHADER_RS_SEPARATEALPHABLENDENABLEcxx . . $ MOJOSHADER_RS_SEPARATEALPHABLENDENABLE., |
| 127 | MOJOSHADER_RS_SRCBLENDALPHAcxx . . $ MOJOSHADER_RS_SRCBLENDALPHA., |
| 128 | MOJOSHADER_RS_DESTBLENDALPHAcxx . . $ MOJOSHADER_RS_DESTBLENDALPHA., |
| 129 | MOJOSHADER_RS_BLENDOPALPHAcxx . . $ MOJOSHADER_RS_BLENDOPALPHA., |
| 130 | |
| 131 | /* These aren't really "states", but these numbers are |
| 132 | * referred to by MOJOSHADER_effectStateType as such. |
| 133 | */ |
| 134 | MOJOSHADER_RS_VERTEXSHADERcxx . . $ MOJOSHADER_RS_VERTEXSHADER. = 146, |
| 135 | MOJOSHADER_RS_PIXELSHADERcxx . . $ MOJOSHADER_RS_PIXELSHADER. = 147 |
| 136 | } MOJOSHADER_renderStateTypecxx . . $ MOJOSHADER_renderStateType#; |
| 137 | |
| 138 | typedef enum MOJOSHADER_zBufferTypecxx . . $ MOJOSHADER_zBufferType# |
| 139 | { |
| 140 | MOJOSHADER_ZB_FALSEcxx . . $ MOJOSHADER_ZB_FALSE., |
| 141 | MOJOSHADER_ZB_TRUEcxx . . $ MOJOSHADER_ZB_TRUE., |
| 142 | MOJOSHADER_ZB_USEWcxx . . $ MOJOSHADER_ZB_USEW. |
| 143 | } MOJOSHADER_zBufferTypecxx . . $ MOJOSHADER_zBufferType#; |
| 144 | |
| 145 | typedef enum MOJOSHADER_fillModecxx . . $ MOJOSHADER_fillMode# |
| 146 | { |
| 147 | MOJOSHADER_FILL_POINTcxx . . $ MOJOSHADER_FILL_POINT. = 1, |
| 148 | MOJOSHADER_FILL_WIREFRAMEcxx . . $ MOJOSHADER_FILL_WIREFRAME. = 2, |
| 149 | MOJOSHADER_FILL_SOLIDcxx . . $ MOJOSHADER_FILL_SOLID. = 3 |
| 150 | } MOJOSHADER_fillModecxx . . $ MOJOSHADER_fillMode#; |
| 151 | |
| 152 | typedef enum MOJOSHADER_shadeModecxx . . $ MOJOSHADER_shadeMode# |
| 153 | { |
| 154 | MOJOSHADER_SHADE_FLATcxx . . $ MOJOSHADER_SHADE_FLAT. = 1, |
| 155 | MOJOSHADER_SHADE_GOURAUDcxx . . $ MOJOSHADER_SHADE_GOURAUD. = 2, |
| 156 | MOJOSHADER_SHADE_PHONGcxx . . $ MOJOSHADER_SHADE_PHONG. = 3 |
| 157 | } MOJOSHADER_shadeModecxx . . $ MOJOSHADER_shadeMode#; |
| 158 | |
| 159 | typedef enum MOJOSHADER_blendModecxx . . $ MOJOSHADER_blendMode# |
| 160 | { |
| 161 | MOJOSHADER_BLEND_ZEROcxx . . $ MOJOSHADER_BLEND_ZERO. = 1, |
| 162 | MOJOSHADER_BLEND_ONEcxx . . $ MOJOSHADER_BLEND_ONE. = 2, |
| 163 | MOJOSHADER_BLEND_SRCCOLORcxx . . $ MOJOSHADER_BLEND_SRCCOLOR. = 3, |
| 164 | MOJOSHADER_BLEND_INVSRCCOLORcxx . . $ MOJOSHADER_BLEND_INVSRCCOLOR. = 4, |
| 165 | MOJOSHADER_BLEND_SRCALPHAcxx . . $ MOJOSHADER_BLEND_SRCALPHA. = 5, |
| 166 | MOJOSHADER_BLEND_INVSRCALPHAcxx . . $ MOJOSHADER_BLEND_INVSRCALPHA. = 6, |
| 167 | MOJOSHADER_BLEND_DESTALPHAcxx . . $ MOJOSHADER_BLEND_DESTALPHA. = 7, |
| 168 | MOJOSHADER_BLEND_INVDESTALPHAcxx . . $ MOJOSHADER_BLEND_INVDESTALPHA. = 8, |
| 169 | MOJOSHADER_BLEND_DESTCOLORcxx . . $ MOJOSHADER_BLEND_DESTCOLOR. = 9, |
| 170 | MOJOSHADER_BLEND_INVDESTCOLORcxx . . $ MOJOSHADER_BLEND_INVDESTCOLOR. = 10, |
| 171 | MOJOSHADER_BLEND_SRCALPHASATcxx . . $ MOJOSHADER_BLEND_SRCALPHASAT. = 11, |
| 172 | MOJOSHADER_BLEND_BOTHSRCALPHAcxx . . $ MOJOSHADER_BLEND_BOTHSRCALPHA. = 12, |
| 173 | MOJOSHADER_BLEND_BOTHINVSRCALPHAcxx . . $ MOJOSHADER_BLEND_BOTHINVSRCALPHA. = 13, |
| 174 | MOJOSHADER_BLEND_BLENDFACTORcxx . . $ MOJOSHADER_BLEND_BLENDFACTOR. = 14, |
| 175 | MOJOSHADER_BLEND_INVBLENDFACTORcxx . . $ MOJOSHADER_BLEND_INVBLENDFACTOR. = 15, |
| 176 | MOJOSHADER_BLEND_SRCCOLOR2cxx . . $ MOJOSHADER_BLEND_SRCCOLOR2. = 16, |
| 177 | MOJOSHADER_BLEND_INVSRCCOLOR2cxx . . $ MOJOSHADER_BLEND_INVSRCCOLOR2. = 17 |
| 178 | } MOJOSHADER_blendModecxx . . $ MOJOSHADER_blendMode#; |
| 179 | |
| 180 | typedef enum MOJOSHADER_cullModecxx . . $ MOJOSHADER_cullMode# |
| 181 | { |
| 182 | MOJOSHADER_CULL_NONEcxx . . $ MOJOSHADER_CULL_NONE. = 1, |
| 183 | MOJOSHADER_CULL_CWcxx . . $ MOJOSHADER_CULL_CW. = 2, |
| 184 | MOJOSHADER_CULL_CCWcxx . . $ MOJOSHADER_CULL_CCW. = 3 |
| 185 | } MOJOSHADER_cullModecxx . . $ MOJOSHADER_cullMode#; |
| 186 | |
| 187 | typedef enum MOJOSHADER_compareFunccxx . . $ MOJOSHADER_compareFunc# |
| 188 | { |
| 189 | MOJOSHADER_CMP_NEVERcxx . . $ MOJOSHADER_CMP_NEVER. = 1, |
| 190 | MOJOSHADER_CMP_LESScxx . . $ MOJOSHADER_CMP_LESS. = 2, |
| 191 | MOJOSHADER_CMP_EQUALcxx . . $ MOJOSHADER_CMP_EQUAL. = 3, |
| 192 | MOJOSHADER_CMP_LESSEQUALcxx . . $ MOJOSHADER_CMP_LESSEQUAL. = 4, |
| 193 | MOJOSHADER_CMP_GREATERcxx . . $ MOJOSHADER_CMP_GREATER. = 5, |
| 194 | MOJOSHADER_CMP_NOTEQUALcxx . . $ MOJOSHADER_CMP_NOTEQUAL. = 6, |
| 195 | MOJOSHADER_CMP_GREATEREQUALcxx . . $ MOJOSHADER_CMP_GREATEREQUAL. = 7, |
| 196 | MOJOSHADER_CMP_ALWAYScxx . . $ MOJOSHADER_CMP_ALWAYS. = 8 |
| 197 | } MOJOSHADER_compareFunccxx . . $ MOJOSHADER_compareFunc#; |
| 198 | |
| 199 | typedef enum MOJOSHADER_fogModecxx . . $ MOJOSHADER_fogMode# |
| 200 | { |
| 201 | MOJOSHADER_FOG_NONEcxx . . $ MOJOSHADER_FOG_NONE., |
| 202 | MOJOSHADER_FOG_EXPcxx . . $ MOJOSHADER_FOG_EXP., |
| 203 | MOJOSHADER_FOG_EXP2cxx . . $ MOJOSHADER_FOG_EXP2., |
| 204 | MOJOSHADER_FOG_LINEARcxx . . $ MOJOSHADER_FOG_LINEAR. |
| 205 | } MOJOSHADER_fogModecxx . . $ MOJOSHADER_fogMode#; |
| 206 | |
| 207 | typedef enum MOJOSHADER_stencilOpcxx . . $ MOJOSHADER_stencilOp# |
| 208 | { |
| 209 | MOJOSHADER_STENCILOP_KEEPcxx . . $ MOJOSHADER_STENCILOP_KEEP. = 1, |
| 210 | MOJOSHADER_STENCILOP_ZEROcxx . . $ MOJOSHADER_STENCILOP_ZERO. = 2, |
| 211 | MOJOSHADER_STENCILOP_REPLACEcxx . . $ MOJOSHADER_STENCILOP_REPLACE. = 3, |
| 212 | MOJOSHADER_STENCILOP_INCRSATcxx . . $ MOJOSHADER_STENCILOP_INCRSAT. = 4, |
| 213 | MOJOSHADER_STENCILOP_DECRSATcxx . . $ MOJOSHADER_STENCILOP_DECRSAT. = 5, |
| 214 | MOJOSHADER_STENCILOP_INVERTcxx . . $ MOJOSHADER_STENCILOP_INVERT. = 6, |
| 215 | MOJOSHADER_STENCILOP_INCRcxx . . $ MOJOSHADER_STENCILOP_INCR. = 7, |
| 216 | MOJOSHADER_STENCILOP_DECRcxx . . $ MOJOSHADER_STENCILOP_DECR. = 8 |
| 217 | } MOJOSHADER_stencilOpcxx . . $ MOJOSHADER_stencilOp#; |
| 218 | |
| 219 | typedef enum MOJOSHADER_materialColorSourcecxx . . $ MOJOSHADER_materialColorSource# |
| 220 | { |
| 221 | MOJOSHADER_MCS_MATERIALcxx . . $ MOJOSHADER_MCS_MATERIAL., |
| 222 | MOJOSHADER_MCS_COLOR1cxx . . $ MOJOSHADER_MCS_COLOR1., |
| 223 | MOJOSHADER_MCS_COLOR2cxx . . $ MOJOSHADER_MCS_COLOR2. |
| 224 | } MOJOSHADER_materialColorSourcecxx . . $ MOJOSHADER_materialColorSource#; |
| 225 | |
| 226 | typedef enum MOJOSHADER_vertexBlendFlagscxx . . $ MOJOSHADER_vertexBlendFlags# |
| 227 | { |
| 228 | MOJOSHADER_VBF_DISABLEcxx . . $ MOJOSHADER_VBF_DISABLE. = 0, |
| 229 | MOJOSHADER_VBF_1WEIGHTScxx . . $ MOJOSHADER_VBF_1WEIGHTS. = 1, |
| 230 | MOJOSHADER_VBF_2WEIGHTScxx . . $ MOJOSHADER_VBF_2WEIGHTS. = 2, |
| 231 | MOJOSHADER_VBF_3WEIGHTScxx . . $ MOJOSHADER_VBF_3WEIGHTS. = 3, |
| 232 | MOJOSHADER_VBF_TWEENINGcxx . . $ MOJOSHADER_VBF_TWEENING. = 255, |
| 233 | MOJOSHADER_VBF_0WEIGHTScxx . . $ MOJOSHADER_VBF_0WEIGHTS. = 256 |
| 234 | } MOJOSHADER_vertexBlendFlagscxx . . $ MOJOSHADER_vertexBlendFlags#; |
| 235 | |
| 236 | typedef enum MOJOSHADER_patchedEdgeStylecxx . . $ MOJOSHADER_patchedEdgeStyle# |
| 237 | { |
| 238 | MOJOSHADER_PATCHEDGE_DISCRETEcxx . . $ MOJOSHADER_PATCHEDGE_DISCRETE., |
| 239 | MOJOSHADER_PATCHEDGE_CONTINUOUScxx . . $ MOJOSHADER_PATCHEDGE_CONTINUOUS. |
| 240 | } MOJOSHADER_patchedEdgeStylecxx . . $ MOJOSHADER_patchedEdgeStyle#; |
| 241 | |
| 242 | typedef enum MOJOSHADER_debugMonitorTokenscxx . . $ MOJOSHADER_debugMonitorTokens# |
| 243 | { |
| 244 | MOJOSHADER_DMT_ENABLEcxx . . $ MOJOSHADER_DMT_ENABLE., |
| 245 | MOJOSHADER_DMT_DISABLEcxx . . $ MOJOSHADER_DMT_DISABLE. |
| 246 | } MOJOSHADER_debugMonitorTokenscxx . . $ MOJOSHADER_debugMonitorTokens#; |
| 247 | |
| 248 | typedef enum MOJOSHADER_blendOpcxx . . $ MOJOSHADER_blendOp# |
| 249 | { |
| 250 | MOJOSHADER_BLENDOP_ADDcxx . . $ MOJOSHADER_BLENDOP_ADD. = 1, |
| 251 | MOJOSHADER_BLENDOP_SUBTRACTcxx . . $ MOJOSHADER_BLENDOP_SUBTRACT. = 2, |
| 252 | MOJOSHADER_BLENDOP_REVSUBTRACTcxx . . $ MOJOSHADER_BLENDOP_REVSUBTRACT. = 3, |
| 253 | MOJOSHADER_BLENDOP_MINcxx . . $ MOJOSHADER_BLENDOP_MIN. = 4, |
| 254 | MOJOSHADER_BLENDOP_MAXcxx . . $ MOJOSHADER_BLENDOP_MAX. = 5 |
| 255 | } MOJOSHADER_blendOpcxx . . $ MOJOSHADER_blendOp#; |
| 256 | |
| 257 | typedef enum MOJOSHADER_degreeTypecxx . . $ MOJOSHADER_degreeType# |
| 258 | { |
| 259 | MOJOSHADER_DEGREE_LINEARcxx . . $ MOJOSHADER_DEGREE_LINEAR. = 1, |
| 260 | MOJOSHADER_DEGREE_QUADRATICcxx . . $ MOJOSHADER_DEGREE_QUADRATIC. = 2, |
| 261 | MOJOSHADER_DEGREE_CUBICcxx . . $ MOJOSHADER_DEGREE_CUBIC. = 3, |
| 262 | MOJOSHADER_DEGREE_QUINTICcxx . . $ MOJOSHADER_DEGREE_QUINTIC. = 5 |
| 263 | } MOJOSHADER_degreeTypecxx . . $ MOJOSHADER_degreeType#; |
| 264 | |
| 265 | |
| 266 | /* MOJOSHADER_effectSamplerState types... */ |
| 267 | |
| 268 | typedef enum MOJOSHADER_samplerStateTypecxx . . $ MOJOSHADER_samplerStateType# |
| 269 | { |
| 270 | MOJOSHADER_SAMP_UNKNOWN0cxx . . $ MOJOSHADER_SAMP_UNKNOWN0. = 0, |
| 271 | MOJOSHADER_SAMP_UNKNOWN1cxx . . $ MOJOSHADER_SAMP_UNKNOWN1. = 1, |
| 272 | MOJOSHADER_SAMP_UNKNOWN2cxx . . $ MOJOSHADER_SAMP_UNKNOWN2. = 2, |
| 273 | MOJOSHADER_SAMP_UNKNOWN3cxx . . $ MOJOSHADER_SAMP_UNKNOWN3. = 3, |
| 274 | MOJOSHADER_SAMP_TEXTUREcxx . . $ MOJOSHADER_SAMP_TEXTURE. = 4, |
| 275 | MOJOSHADER_SAMP_ADDRESSUcxx . . $ MOJOSHADER_SAMP_ADDRESSU. = 5, |
| 276 | MOJOSHADER_SAMP_ADDRESSVcxx . . $ MOJOSHADER_SAMP_ADDRESSV. = 6, |
| 277 | MOJOSHADER_SAMP_ADDRESSWcxx . . $ MOJOSHADER_SAMP_ADDRESSW. = 7, |
| 278 | MOJOSHADER_SAMP_BORDERCOLORcxx . . $ MOJOSHADER_SAMP_BORDERCOLOR. = 8, |
| 279 | MOJOSHADER_SAMP_MAGFILTERcxx . . $ MOJOSHADER_SAMP_MAGFILTER. = 9, |
| 280 | MOJOSHADER_SAMP_MINFILTERcxx . . $ MOJOSHADER_SAMP_MINFILTER. = 10, |
| 281 | MOJOSHADER_SAMP_MIPFILTERcxx . . $ MOJOSHADER_SAMP_MIPFILTER. = 11, |
| 282 | MOJOSHADER_SAMP_MIPMAPLODBIAScxx . . $ MOJOSHADER_SAMP_MIPMAPLODBIAS. = 12, |
| 283 | MOJOSHADER_SAMP_MAXMIPLEVELcxx . . $ MOJOSHADER_SAMP_MAXMIPLEVEL. = 13, |
| 284 | MOJOSHADER_SAMP_MAXANISOTROPYcxx . . $ MOJOSHADER_SAMP_MAXANISOTROPY. = 14, |
| 285 | MOJOSHADER_SAMP_SRGBTEXTUREcxx . . $ MOJOSHADER_SAMP_SRGBTEXTURE. = 15, |
| 286 | MOJOSHADER_SAMP_ELEMENTINDEXcxx . . $ MOJOSHADER_SAMP_ELEMENTINDEX. = 16, |
| 287 | MOJOSHADER_SAMP_DMAPOFFSETcxx . . $ MOJOSHADER_SAMP_DMAPOFFSET. = 17 |
| 288 | } MOJOSHADER_samplerStateTypecxx . . $ MOJOSHADER_samplerStateType#; |
| 289 | |
| 290 | typedef enum MOJOSHADER_textureAddresscxx . . $ MOJOSHADER_textureAddress# |
| 291 | { |
| 292 | MOJOSHADER_TADDRESS_WRAPcxx . . $ MOJOSHADER_TADDRESS_WRAP. = 1, |
| 293 | MOJOSHADER_TADDRESS_MIRRORcxx . . $ MOJOSHADER_TADDRESS_MIRROR. = 2, |
| 294 | MOJOSHADER_TADDRESS_CLAMPcxx . . $ MOJOSHADER_TADDRESS_CLAMP. = 3, |
| 295 | MOJOSHADER_TADDRESS_BORDERcxx . . $ MOJOSHADER_TADDRESS_BORDER. = 4, |
| 296 | MOJOSHADER_TADDRESS_MIRRORONCEcxx . . $ MOJOSHADER_TADDRESS_MIRRORONCE. = 5 |
| 297 | } MOJOSHADER_textureAddresscxx . . $ MOJOSHADER_textureAddress#; |
| 298 | |
| 299 | typedef enum MOJOSHADER_textureFilterTypecxx . . $ MOJOSHADER_textureFilterType# |
| 300 | { |
| 301 | MOJOSHADER_TEXTUREFILTER_NONEcxx . . $ MOJOSHADER_TEXTUREFILTER_NONE., |
| 302 | MOJOSHADER_TEXTUREFILTER_POINTcxx . . $ MOJOSHADER_TEXTUREFILTER_POINT., |
| 303 | MOJOSHADER_TEXTUREFILTER_LINEARcxx . . $ MOJOSHADER_TEXTUREFILTER_LINEAR., |
| 304 | MOJOSHADER_TEXTUREFILTER_ANISOTROPICcxx . . $ MOJOSHADER_TEXTUREFILTER_ANISOTROPIC., |
| 305 | MOJOSHADER_TEXTUREFILTER_PYRAMIDALQUADcxx . . $ MOJOSHADER_TEXTUREFILTER_PYRAMIDALQUAD., |
| 306 | MOJOSHADER_TEXTUREFILTER_GAUSSIANQUADcxx . . $ MOJOSHADER_TEXTUREFILTER_GAUSSIANQUAD., |
| 307 | MOJOSHADER_TEXTUREFILTER_CONVOLUTIONMONOcxx . . $ MOJOSHADER_TEXTUREFILTER_CONVOLUTIONMONO. |
| 308 | } MOJOSHADER_textureFilterTypecxx . . $ MOJOSHADER_textureFilterType#; |
| 309 | |
| 310 | |
| 311 | /* Effect value types... */ |
| 312 | |
| 313 | typedef struct MOJOSHADER_effectSamplerStatecxx . . $ MOJOSHADER_effectSamplerState# MOJOSHADER_effectSamplerStatecxx . . $ MOJOSHADER_effectSamplerState#; |
| 314 | |
| 315 | typedef struct MOJOSHADER_effectValuecxx . . $ MOJOSHADER_effectValue# |
| 316 | { |
| 317 | const char *namecxx . . $ MOJOSHADER_effectValue#name.; |
| 318 | const char *semanticcxx . . $ MOJOSHADER_effectValue#semantic.; |
| 319 | MOJOSHADER_symbolTypeInfocxx . . $ MOJOSHADER_symbolTypeInfo# typecxx . . $ MOJOSHADER_effectValue#type.; |
| 320 | unsigned int value_countcxx . . $ MOJOSHADER_effectValue#value_count.; |
| 321 | MOJOSHADERNAMELESScxx . . $ `mojoshader.h:49:9`! unioncxx . . $ MOJOSHADER_effectValue#$anonymous_type_0# |
| 322 | { |
| 323 | /* Raw value types */ |
| 324 | void *valuescxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#values.; |
| 325 | int *valuesIcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesI.; |
| 326 | float *valuesFcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesF.; |
| 327 | /* As used by MOJOSHADER_effectState */ |
| 328 | MOJOSHADER_zBufferTypecxx . . $ MOJOSHADER_zBufferType# *valuesZBTcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesZBT.; |
| 329 | MOJOSHADER_fillModecxx . . $ MOJOSHADER_fillMode# *valuesFiMcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesFiM.; |
| 330 | MOJOSHADER_shadeModecxx . . $ MOJOSHADER_shadeMode# *valuesSMcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesSM.; |
| 331 | MOJOSHADER_blendModecxx . . $ MOJOSHADER_blendMode# *valuesBMcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesBM.; |
| 332 | MOJOSHADER_cullModecxx . . $ MOJOSHADER_cullMode# *valuesCMcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesCM.; |
| 333 | MOJOSHADER_compareFunccxx . . $ MOJOSHADER_compareFunc# *valuesCFcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesCF.; |
| 334 | MOJOSHADER_fogModecxx . . $ MOJOSHADER_fogMode# *valuesFoMcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesFoM.; |
| 335 | MOJOSHADER_stencilOpcxx . . $ MOJOSHADER_stencilOp# *valuesSOcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesSO.; |
| 336 | MOJOSHADER_materialColorSourcecxx . . $ MOJOSHADER_materialColorSource# *valuesMCScxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesMCS.; |
| 337 | MOJOSHADER_vertexBlendFlagscxx . . $ MOJOSHADER_vertexBlendFlags# *valuesVBFcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesVBF.; |
| 338 | MOJOSHADER_patchedEdgeStylecxx . . $ MOJOSHADER_patchedEdgeStyle# *valuesPEScxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesPES.; |
| 339 | MOJOSHADER_debugMonitorTokenscxx . . $ MOJOSHADER_debugMonitorTokens# *valuesDMTcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesDMT.; |
| 340 | MOJOSHADER_blendOpcxx . . $ MOJOSHADER_blendOp# *valuesBOcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesBO.; |
| 341 | MOJOSHADER_degreeTypecxx . . $ MOJOSHADER_degreeType# *valuesDTcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesDT.; |
| 342 | /* As used by MOJOSHADER_effectSamplerState */ |
| 343 | MOJOSHADER_textureAddresscxx . . $ MOJOSHADER_textureAddress# *valuesTAcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesTA.; |
| 344 | MOJOSHADER_textureFilterTypecxx . . $ MOJOSHADER_textureFilterType# *valuesTFTcxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesTFT.; |
| 345 | /* As used by MOJOSHADER_effectParameter */ |
| 346 | MOJOSHADER_effectSamplerStatecxx . . $ MOJOSHADER_effectSamplerState# *valuesSScxx . . $ MOJOSHADER_effectValue#$anonymous_type_0#valuesSS.; |
| 347 | }; |
| 348 | } MOJOSHADER_effectValuecxx . . $ MOJOSHADER_effectValue#; |
| 349 | |
| 350 | typedef struct MOJOSHADER_effectStatecxx . . $ MOJOSHADER_effectState# |
| 351 | { |
| 352 | MOJOSHADER_renderStateTypecxx . . $ MOJOSHADER_renderStateType# typecxx . . $ MOJOSHADER_effectState#type.; |
| 353 | MOJOSHADER_effectValuecxx . . $ MOJOSHADER_effectValue# valuecxx . . $ MOJOSHADER_effectState#value.; |
| 354 | } MOJOSHADER_effectStatecxx . . $ MOJOSHADER_effectState#; |
| 355 | |
| 356 | struct MOJOSHADER_effectSamplerStatecxx . . $ MOJOSHADER_effectSamplerState# |
| 357 | { |
| 358 | MOJOSHADER_samplerStateTypecxx . . $ MOJOSHADER_samplerStateType# typecxx . . $ MOJOSHADER_effectSamplerState#type.; |
| 359 | MOJOSHADER_effectValuecxx . . $ MOJOSHADER_effectValue# valuecxx . . $ MOJOSHADER_effectSamplerState#value.; |
| 360 | }; |
| 361 | |
| 362 | typedef MOJOSHADER_effectValuecxx . . $ MOJOSHADER_effectValue# MOJOSHADER_effectAnnotationcxx . . $ MOJOSHADER_effectAnnotation#; |
| 363 | |
| 364 | |
| 365 | /* Effect interface structures... */ |
| 366 | |
| 367 | typedef struct MOJOSHADER_effectParamcxx . . $ MOJOSHADER_effectParam# |
| 368 | { |
| 369 | MOJOSHADER_effectValuecxx . . $ MOJOSHADER_effectValue# valuecxx . . $ MOJOSHADER_effectParam#value.; |
| 370 | unsigned int annotation_countcxx . . $ MOJOSHADER_effectParam#annotation_count.; |
| 371 | MOJOSHADER_effectAnnotationcxx . . $ MOJOSHADER_effectAnnotation# *annotationscxx . . $ MOJOSHADER_effectParam#annotations.; |
| 372 | } MOJOSHADER_effectParamcxx . . $ MOJOSHADER_effectParam#; |
| 373 | |
| 374 | typedef struct MOJOSHADER_effectPasscxx . . $ MOJOSHADER_effectPass# |
| 375 | { |
| 376 | const char *namecxx . . $ MOJOSHADER_effectPass#name.; |
| 377 | unsigned int state_countcxx . . $ MOJOSHADER_effectPass#state_count.; |
| 378 | MOJOSHADER_effectStatecxx . . $ MOJOSHADER_effectState# *statescxx . . $ MOJOSHADER_effectPass#states.; |
| 379 | unsigned int annotation_countcxx . . $ MOJOSHADER_effectPass#annotation_count.; |
| 380 | MOJOSHADER_effectAnnotationcxx . . $ MOJOSHADER_effectAnnotation#* annotationscxx . . $ MOJOSHADER_effectPass#annotations.; |
| 381 | } MOJOSHADER_effectPasscxx . . $ MOJOSHADER_effectPass#; |
| 382 | |
| 383 | typedef struct MOJOSHADER_effectTechniquecxx . . $ MOJOSHADER_effectTechnique# |
| 384 | { |
| 385 | const char *namecxx . . $ MOJOSHADER_effectTechnique#name.; |
| 386 | unsigned int pass_countcxx . . $ MOJOSHADER_effectTechnique#pass_count.; |
| 387 | MOJOSHADER_effectPasscxx . . $ MOJOSHADER_effectPass# *passescxx . . $ MOJOSHADER_effectTechnique#passes.; |
| 388 | unsigned int annotation_countcxx . . $ MOJOSHADER_effectTechnique#annotation_count.; |
| 389 | MOJOSHADER_effectAnnotationcxx . . $ MOJOSHADER_effectAnnotation#* annotationscxx . . $ MOJOSHADER_effectTechnique#annotations.; |
| 390 | } MOJOSHADER_effectTechniquecxx . . $ MOJOSHADER_effectTechnique#; |
| 391 | |
| 392 | |
| 393 | /* Effect "objects"... */ |
| 394 | |
| 395 | /* Defined later in the state change types... */ |
| 396 | typedef struct MOJOSHADER_samplerStateRegistercxx . . $ MOJOSHADER_samplerStateRegister# MOJOSHADER_samplerStateRegistercxx . . $ MOJOSHADER_samplerStateRegister#; |
| 397 | |
| 398 | typedef struct MOJOSHADER_effectShadercxx . . $ MOJOSHADER_effectShader# |
| 399 | { |
| 400 | MOJOSHADER_symbolTypecxx . . $ MOJOSHADER_symbolType# typecxx . . $ MOJOSHADER_effectShader#type.; |
| 401 | unsigned int techniquecxx . . $ MOJOSHADER_effectShader#technique.; |
| 402 | unsigned int passcxx . . $ MOJOSHADER_effectShader#pass.; |
| 403 | unsigned int is_preshadercxx . . $ MOJOSHADER_effectShader#is_preshader.; |
| 404 | unsigned int preshader_param_countcxx . . $ MOJOSHADER_effectShader#preshader_param_count.; |
| 405 | unsigned int *preshader_paramscxx . . $ MOJOSHADER_effectShader#preshader_params.; |
| 406 | unsigned int param_countcxx . . $ MOJOSHADER_effectShader#param_count.; |
| 407 | unsigned int *paramscxx . . $ MOJOSHADER_effectShader#params.; |
| 408 | unsigned int sampler_countcxx . . $ MOJOSHADER_effectShader#sampler_count.; |
| 409 | MOJOSHADER_samplerStateRegistercxx . . $ MOJOSHADER_samplerStateRegister# *samplerscxx . . $ MOJOSHADER_effectShader#samplers.; |
| 410 | MOJOSHADERNAMELESScxx . . $ `mojoshader.h:49:9`! unioncxx . . $ MOJOSHADER_effectShader#$anonymous_type_1# |
| 411 | { |
| 412 | void *shadercxx . . $ MOJOSHADER_effectShader#$anonymous_type_1#shader.; /* glShader, mtlShader, etc. */ |
| 413 | const MOJOSHADER_preshadercxx . . $ MOJOSHADER_preshader# *preshadercxx . . $ MOJOSHADER_effectShader#$anonymous_type_1#preshader.; |
| 414 | }; |
| 415 | } MOJOSHADER_effectShadercxx . . $ MOJOSHADER_effectShader#; |
| 416 | |
| 417 | typedef struct MOJOSHADER_effectSamplerMapcxx . . $ MOJOSHADER_effectSamplerMap# |
| 418 | { |
| 419 | MOJOSHADER_symbolTypecxx . . $ MOJOSHADER_symbolType# typecxx . . $ MOJOSHADER_effectSamplerMap#type.; |
| 420 | const char *namecxx . . $ MOJOSHADER_effectSamplerMap#name.; |
| 421 | } MOJOSHADER_effectSamplerMapcxx . . $ MOJOSHADER_effectSamplerMap#; |
| 422 | |
| 423 | typedef struct MOJOSHADER_effectStringcxx . . $ MOJOSHADER_effectString# |
| 424 | { |
| 425 | MOJOSHADER_symbolTypecxx . . $ MOJOSHADER_symbolType# typecxx . . $ MOJOSHADER_effectString#type.; |
| 426 | const char *stringcxx . . $ MOJOSHADER_effectString#string.; |
| 427 | } MOJOSHADER_effectStringcxx . . $ MOJOSHADER_effectString#; |
| 428 | |
| 429 | typedef struct MOJOSHADER_effectTexturecxx . . $ MOJOSHADER_effectTexture# |
| 430 | { |
| 431 | MOJOSHADER_symbolTypecxx . . $ MOJOSHADER_symbolType# typecxx . . $ MOJOSHADER_effectTexture#type.; |
| 432 | /* FIXME: Does this even do anything? */ |
| 433 | } MOJOSHADER_effectTexturecxx . . $ MOJOSHADER_effectTexture#; |
| 434 | |
| 435 | typedef union MOJOSHADER_effectObjectcxx . . $ MOJOSHADER_effectObject# |
| 436 | { |
| 437 | MOJOSHADER_symbolTypecxx . . $ MOJOSHADER_symbolType# typecxx . . $ MOJOSHADER_effectObject#type.; |
| 438 | MOJOSHADERNAMELESScxx . . $ `mojoshader.h:49:9`! unioncxx . . $ MOJOSHADER_effectObject#$anonymous_type_2# |
| 439 | { |
| 440 | MOJOSHADER_effectShadercxx . . $ MOJOSHADER_effectShader# shadercxx . . $ MOJOSHADER_effectObject#$anonymous_type_2#shader.; |
| 441 | MOJOSHADER_effectSamplerMapcxx . . $ MOJOSHADER_effectSamplerMap# mappingcxx . . $ MOJOSHADER_effectObject#$anonymous_type_2#mapping.; |
| 442 | MOJOSHADER_effectStringcxx . . $ MOJOSHADER_effectString# stringcxx . . $ MOJOSHADER_effectObject#$anonymous_type_2#string.; |
| 443 | MOJOSHADER_effectTexturecxx . . $ MOJOSHADER_effectTexture# texturecxx . . $ MOJOSHADER_effectObject#$anonymous_type_2#texture.; |
| 444 | }; |
| 445 | } MOJOSHADER_effectObjectcxx . . $ MOJOSHADER_effectObject#; |
| 446 | |
| 447 | |
| 448 | /* Effect state change types... */ |
| 449 | |
| 450 | /* Used to store sampler states with accompanying sampler registers */ |
| 451 | struct MOJOSHADER_samplerStateRegistercxx . . $ MOJOSHADER_samplerStateRegister# |
| 452 | { |
| 453 | const char *sampler_namecxx . . $ MOJOSHADER_samplerStateRegister#sampler_name.; |
| 454 | unsigned int sampler_registercxx . . $ MOJOSHADER_samplerStateRegister#sampler_register.; |
| 455 | unsigned int sampler_state_countcxx . . $ MOJOSHADER_samplerStateRegister#sampler_state_count.; |
| 456 | const MOJOSHADER_effectSamplerStatecxx . . $ MOJOSHADER_effectSamplerState# *sampler_statescxx . . $ MOJOSHADER_samplerStateRegister#sampler_states.; |
| 457 | }; |
| 458 | |
| 459 | /* |
| 460 | * Used to acquire the desired render state by the effect pass. |
| 461 | */ |
| 462 | typedef struct MOJOSHADER_effectStateChangescxx . . $ MOJOSHADER_effectStateChanges# |
| 463 | { |
| 464 | /* Render state changes caused by effect technique */ |
| 465 | unsigned int render_state_change_countcxx . . $ MOJOSHADER_effectStateChanges#render_state_change_count.; |
| 466 | const MOJOSHADER_effectStatecxx . . $ MOJOSHADER_effectState# *render_state_changescxx . . $ MOJOSHADER_effectStateChanges#render_state_changes.; |
| 467 | |
| 468 | /* Sampler state changes caused by effect technique */ |
| 469 | unsigned int sampler_state_change_countcxx . . $ MOJOSHADER_effectStateChanges#sampler_state_change_count.; |
| 470 | const MOJOSHADER_samplerStateRegistercxx . . $ MOJOSHADER_samplerStateRegister# *sampler_state_changescxx . . $ MOJOSHADER_effectStateChanges#sampler_state_changes.; |
| 471 | |
| 472 | /* Vertex sampler state changes caused by effect technique */ |
| 473 | unsigned int vertex_sampler_state_change_countcxx . . $ MOJOSHADER_effectStateChanges#vertex_sampler_state_change_count.; |
| 474 | const MOJOSHADER_samplerStateRegistercxx . . $ MOJOSHADER_samplerStateRegister# *vertex_sampler_state_changescxx . . $ MOJOSHADER_effectStateChanges#vertex_sampler_state_changes.; |
| 475 | } MOJOSHADER_effectStateChangescxx . . $ MOJOSHADER_effectStateChanges#; |
| 476 | |
| 477 | |
| 478 | /* |
| 479 | * VTable system for building/running effect shaders... |
| 480 | */ |
| 481 | |
| 482 | typedef void* (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_compileShaderFunccxx . . $ MOJOSHADER_compileShaderFunc#)( |
| 483 | const void *ctx, |
| 484 | const char *mainfn, |
| 485 | const unsigned char *tokenbuf, |
| 486 | const unsigned int bufsize, |
| 487 | const MOJOSHADER_swizzlecxx . . $ MOJOSHADER_swizzle# *swiz, |
| 488 | const unsigned int swizcount, |
| 489 | const MOJOSHADER_samplerMapcxx . . $ MOJOSHADER_samplerMap# *smap, |
| 490 | const unsigned int smapcount |
| 491 | ); |
| 492 | typedef void (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_shaderAddRefFunccxx . . $ MOJOSHADER_shaderAddRefFunc#)(void* shader); |
| 493 | typedef void (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_deleteShaderFunccxx . . $ MOJOSHADER_deleteShaderFunc#)( |
| 494 | const void *ctx, |
| 495 | void* shader |
| 496 | ); |
| 497 | typedef MOJOSHADER_parseDatacxx . . $ MOJOSHADER_parseData#* (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_getParseDataFunccxx . . $ MOJOSHADER_getParseDataFunc#)( |
| 498 | void *shader |
| 499 | ); |
| 500 | typedef void (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_bindShadersFunccxx . . $ MOJOSHADER_bindShadersFunc#)( |
| 501 | const void *ctx, |
| 502 | void *vshader, |
| 503 | void *pshader |
| 504 | ); |
| 505 | typedef void (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_getBoundShadersFunccxx . . $ MOJOSHADER_getBoundShadersFunc#)( |
| 506 | const void *ctx, |
| 507 | void **vshader, |
| 508 | void **pshader |
| 509 | ); |
| 510 | typedef void (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_mapUniformBufferMemoryFunccxx . . $ MOJOSHADER_mapUniformBufferMemoryFunc#)( |
| 511 | const void *ctx, |
| 512 | float **vsf, int **vsi, unsigned char **vsb, |
| 513 | float **psf, int **psi, unsigned char **psb |
| 514 | ); |
| 515 | typedef void (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_unmapUniformBufferMemoryFunccxx . . $ MOJOSHADER_unmapUniformBufferMemoryFunc#)( |
| 516 | const void *ctx |
| 517 | ); |
| 518 | typedef const char* (MOJOSHADERCALLcxx . . $ `mojoshader.h:42:9`! * MOJOSHADER_getErrorFunccxx . . $ MOJOSHADER_getErrorFunc#)( |
| 519 | const void *ctx |
| 520 | ); |
| 521 | |
| 522 | typedef struct MOJOSHADER_effectShaderContextcxx . . $ MOJOSHADER_effectShaderContext# |
| 523 | { |
| 524 | /* Shader Backend */ |
| 525 | MOJOSHADER_compileShaderFunccxx . . $ MOJOSHADER_compileShaderFunc# compileShadercxx . . $ MOJOSHADER_effectShaderContext#compileShader.; |
| 526 | MOJOSHADER_shaderAddRefFunccxx . . $ MOJOSHADER_shaderAddRefFunc# shaderAddRefcxx . . $ MOJOSHADER_effectShaderContext#shaderAddRef.; |
| 527 | MOJOSHADER_deleteShaderFunccxx . . $ MOJOSHADER_deleteShaderFunc# deleteShadercxx . . $ MOJOSHADER_effectShaderContext#deleteShader.; |
| 528 | MOJOSHADER_getParseDataFunccxx . . $ MOJOSHADER_getParseDataFunc# getParseDatacxx . . $ MOJOSHADER_effectShaderContext#getParseData.; |
| 529 | MOJOSHADER_bindShadersFunccxx . . $ MOJOSHADER_bindShadersFunc# bindShaderscxx . . $ MOJOSHADER_effectShaderContext#bindShaders.; |
| 530 | MOJOSHADER_getBoundShadersFunccxx . . $ MOJOSHADER_getBoundShadersFunc# getBoundShaderscxx . . $ MOJOSHADER_effectShaderContext#getBoundShaders.; |
| 531 | MOJOSHADER_mapUniformBufferMemoryFunccxx . . $ MOJOSHADER_mapUniformBufferMemoryFunc# mapUniformBufferMemorycxx . . $ MOJOSHADER_effectShaderContext#mapUniformBufferMemory.; |
| 532 | MOJOSHADER_unmapUniformBufferMemoryFunccxx . . $ MOJOSHADER_unmapUniformBufferMemoryFunc# unmapUniformBufferMemorycxx . . $ MOJOSHADER_effectShaderContext#unmapUniformBufferMemory.; |
| 533 | MOJOSHADER_getErrorFunccxx . . $ MOJOSHADER_getErrorFunc# getErrorcxx . . $ MOJOSHADER_effectShaderContext#getError.; |
| 534 | |
| 535 | /* Shader context */ |
| 536 | const void *shaderContextcxx . . $ MOJOSHADER_effectShaderContext#shaderContext.; |
| 537 | |
| 538 | /* Allocator */ |
| 539 | MOJOSHADER_malloccxx . . $ MOJOSHADER_malloc# mcxx . . $ MOJOSHADER_effectShaderContext#m.; |
| 540 | MOJOSHADER_freecxx . . $ MOJOSHADER_free# fcxx . . $ MOJOSHADER_effectShaderContext#f.; |
| 541 | void *malloc_datacxx . . $ MOJOSHADER_effectShaderContext#malloc_data.; |
| 542 | } MOJOSHADER_effectShaderContextcxx . . $ MOJOSHADER_effectShaderContext#; |
| 543 | |
| 544 | |
| 545 | /* |
| 546 | * Structure used to return data from parsing of an effect file... |
| 547 | */ |
| 548 | /* !!! FIXME: most of these ints should be unsigned. */ |
| 549 | typedef struct MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# |
| 550 | { |
| 551 | /* |
| 552 | * Public members. These are the fields your application cares about! |
| 553 | */ |
| 554 | |
| 555 | /* |
| 556 | * The number of elements pointed to by (errors). |
| 557 | */ |
| 558 | int error_countcxx . . $ MOJOSHADER_effect#error_count.; |
| 559 | |
| 560 | /* |
| 561 | * (error_count) elements of data that specify errors that were generated |
| 562 | * by parsing this shader. |
| 563 | * This can be NULL if there were no errors or if (error_count) is zero. |
| 564 | */ |
| 565 | MOJOSHADER_errorcxx . . $ MOJOSHADER_error# *errorscxx . . $ MOJOSHADER_effect#errors.; |
| 566 | |
| 567 | /* |
| 568 | * The number of params pointed to by (params). |
| 569 | */ |
| 570 | int param_countcxx . . $ MOJOSHADER_effect#param_count.; |
| 571 | |
| 572 | /* |
| 573 | * (param_count) elements of data that specify parameter bind points for |
| 574 | * this effect. |
| 575 | * This can be NULL on error or if (param_count) is zero. |
| 576 | */ |
| 577 | MOJOSHADER_effectParamcxx . . $ MOJOSHADER_effectParam# *paramscxx . . $ MOJOSHADER_effect#params.; |
| 578 | |
| 579 | /* |
| 580 | * The number of elements pointed to by (techniques). |
| 581 | */ |
| 582 | int technique_countcxx . . $ MOJOSHADER_effect#technique_count.; |
| 583 | |
| 584 | /* |
| 585 | * (technique_count) elements of data that specify techniques used in |
| 586 | * this effect. Each technique contains a series of passes, and each pass |
| 587 | * specifies state and shaders that affect rendering. |
| 588 | * This can be NULL on error or if (technique_count) is zero. |
| 589 | */ |
| 590 | MOJOSHADER_effectTechniquecxx . . $ MOJOSHADER_effectTechnique# *techniquescxx . . $ MOJOSHADER_effect#techniques.; |
| 591 | |
| 592 | /* |
| 593 | * The number of elements pointed to by (objects). |
| 594 | */ |
| 595 | int object_countcxx . . $ MOJOSHADER_effect#object_count.; |
| 596 | |
| 597 | /* |
| 598 | * (object_count) elements of data that specify objects used in |
| 599 | * this effect. |
| 600 | * This can be NULL on error or if (object_count) is zero. |
| 601 | */ |
| 602 | MOJOSHADER_effectObjectcxx . . $ MOJOSHADER_effectObject# *objectscxx . . $ MOJOSHADER_effect#objects.; |
| 603 | |
| 604 | /* |
| 605 | * Semi-public members. These might be useful, but are better to access from |
| 606 | * a function, not directly. |
| 607 | */ |
| 608 | |
| 609 | /* |
| 610 | * The technique currently being rendered by this effect. |
| 611 | */ |
| 612 | const MOJOSHADER_effectTechniquecxx . . $ MOJOSHADER_effectTechnique# *current_techniquecxx . . $ MOJOSHADER_effect#current_technique.; |
| 613 | |
| 614 | /* |
| 615 | * The index of the current pass being rendered by this effect. |
| 616 | */ |
| 617 | int current_passcxx . . $ MOJOSHADER_effect#current_pass.; |
| 618 | |
| 619 | /* |
| 620 | * Private Members. Do not touch anything below this line! |
| 621 | */ |
| 622 | |
| 623 | /* |
| 624 | * Value used to determine whether or not to restore the previous shader |
| 625 | * state after rendering an effect, as requested by application. |
| 626 | */ |
| 627 | int restore_shader_statecxx . . $ MOJOSHADER_effect#restore_shader_state.; |
| 628 | |
| 629 | /* |
| 630 | * The structure provided by the appliation to store the state changes. |
| 631 | */ |
| 632 | MOJOSHADER_effectStateChangescxx . . $ MOJOSHADER_effectStateChanges# *state_changescxx . . $ MOJOSHADER_effect#state_changes.; |
| 633 | |
| 634 | /* |
| 635 | * Values used to store the current shader state during execution. |
| 636 | */ |
| 637 | MOJOSHADER_effectShadercxx . . $ MOJOSHADER_effectShader# *current_vert_rawcxx . . $ MOJOSHADER_effect#current_vert_raw.; |
| 638 | MOJOSHADER_effectShadercxx . . $ MOJOSHADER_effectShader# *current_pixl_rawcxx . . $ MOJOSHADER_effect#current_pixl_raw.; |
| 639 | void *current_vertcxx . . $ MOJOSHADER_effect#current_vert.; |
| 640 | void *current_pixlcxx . . $ MOJOSHADER_effect#current_pixl.; |
| 641 | |
| 642 | /* |
| 643 | * Values used to restore shader state after the effect has ended. |
| 644 | */ |
| 645 | void *prev_vertex_shadercxx . . $ MOJOSHADER_effect#prev_vertex_shader.; |
| 646 | void *prev_pixel_shadercxx . . $ MOJOSHADER_effect#prev_pixel_shader.; |
| 647 | |
| 648 | /* |
| 649 | * This is the shader implementation you passed to MOJOSHADER_compileEffect(). |
| 650 | */ |
| 651 | MOJOSHADER_effectShaderContextcxx . . $ MOJOSHADER_effectShaderContext# ctxcxx . . $ MOJOSHADER_effect#ctx.; |
| 652 | } MOJOSHADER_effectcxx . . $ MOJOSHADER_effect#; |
| 653 | |
| 654 | |
| 655 | /* Effect compiling interface... */ |
| 656 | |
| 657 | /* Fully compile/link the shaders found within the effect. |
| 658 | * |
| 659 | * (tokenbuf) is a buffer of Direct3D shader bytecode. |
| 660 | * (bufsize) is the size, in bytes, of the bytecode buffer. |
| 661 | * (swiz), (swizcount), (smap), and (smapcount) are passed to |
| 662 | * MOJOSHADER_parse() unmolested. |
| 663 | * (ctx) contains all the function pointers needed to create and bind shaders |
| 664 | * for a specific backend (OpenGL, Metal, etc). |
| 665 | * |
| 666 | * This function returns a MOJOSHADER_effect*, containing effect data which |
| 667 | * includes shaders usable with the provided backend. |
| 668 | * |
| 669 | * This call is only as thread safe as the backend functions! |
| 670 | */ |
| 671 | DECLSPECcxx . . $ `<built-in>:410:9`! MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *MOJOSHADER_compileEffectcxx . . $ MOJOSHADER_compileEffect(12c7c1c1bd2eab4f).(const unsigned char *tokenbuf, |
| 672 | const unsigned int bufsize, |
| 673 | const MOJOSHADER_swizzlecxx . . $ MOJOSHADER_swizzle# *swiz, |
| 674 | const unsigned int swizcount, |
| 675 | const MOJOSHADER_samplerMapcxx . . $ MOJOSHADER_samplerMap# *smap, |
| 676 | const unsigned int smapcount, |
| 677 | const MOJOSHADER_effectShaderContextcxx . . $ MOJOSHADER_effectShaderContext# *ctx); |
| 678 | |
| 679 | /* Delete the shaders that were allocated for an effect. |
| 680 | * |
| 681 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 682 | * |
| 683 | * This call is only as thread safe as the backend functions! |
| 684 | */ |
| 685 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_deleteEffectcxx . . $ MOJOSHADER_deleteEffect(22c98fed39e565dd).(const MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect); |
| 686 | |
| 687 | /* Copies an effect, including current parameter/technique data. |
| 688 | * |
| 689 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 690 | * |
| 691 | * This function returns a MOJOSHADER_effect*, containing effect data which |
| 692 | * includes shaders usable with the provided backend. |
| 693 | * |
| 694 | * This call is only as thread safe as the backend functions! |
| 695 | */ |
| 696 | DECLSPECcxx . . $ `<built-in>:410:9`! MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *MOJOSHADER_cloneEffectcxx . . $ MOJOSHADER_cloneEffect(e7e9b06dd91e404f).(const MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect); |
| 697 | |
| 698 | |
| 699 | /* Effect parameter interface... */ |
| 700 | |
| 701 | /* Set the constant value for the specified effect parameter. |
| 702 | * |
| 703 | * This function maps to ID3DXEffect::SetRawValue. |
| 704 | * |
| 705 | * (parameter) is a parameter obtained from a MOJOSHADER_effect*. |
| 706 | * (data) is the constant values to be applied to the parameter. |
| 707 | * (offset) is the offset, in bytes, of the parameter data being modified. |
| 708 | * (len) is the size, in bytes, of the data buffer being applied. |
| 709 | * |
| 710 | * This function is thread safe. |
| 711 | */ |
| 712 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_effectSetRawValueHandlecxx . . $ MOJOSHADER_effectSetRawValueHandle(f85086b320662ffb).(const MOJOSHADER_effectParamcxx . . $ MOJOSHADER_effectParam# *parameter, |
| 713 | const void *data, |
| 714 | const unsigned int offset, |
| 715 | const unsigned int len); |
| 716 | |
| 717 | /* Set the constant value for the effect parameter, specified by name. |
| 718 | * Note: this function is slower than MOJOSHADER_effectSetRawValueHandle(), |
| 719 | * but we still provide it to fully map to ID3DXEffect. |
| 720 | * |
| 721 | * This function maps to ID3DXEffect::SetRawValue. |
| 722 | * |
| 723 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 724 | * (name) is the human-readable name of the parameter being modified. |
| 725 | * (data) is the constant values to be applied to the parameter. |
| 726 | * (offset) is the offset, in bytes, of the parameter data being modified. |
| 727 | * (len) is the size, in bytes, of the data buffer being applied. |
| 728 | * |
| 729 | * This function is thread safe. |
| 730 | */ |
| 731 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_effectSetRawValueNamecxx . . $ MOJOSHADER_effectSetRawValueName(f2463b503560be8d).(const MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect, |
| 732 | const char *name, |
| 733 | const void *data, |
| 734 | const unsigned int offset, |
| 735 | const unsigned int len); |
| 736 | |
| 737 | |
| 738 | /* Effect technique interface... */ |
| 739 | |
| 740 | /* Get the current technique in use by an effect. |
| 741 | * |
| 742 | * This function maps to ID3DXEffect::GetCurrentTechnique. |
| 743 | * |
| 744 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 745 | * |
| 746 | * This function returns the technique currently used by the given effect. |
| 747 | * |
| 748 | * This function is thread safe. |
| 749 | */ |
| 750 | DECLSPECcxx . . $ `<built-in>:410:9`! const MOJOSHADER_effectTechniquecxx . . $ MOJOSHADER_effectTechnique# *MOJOSHADER_effectGetCurrentTechniquecxx . . $ MOJOSHADER_effectGetCurrentTechnique(1c6cb5938576014).(const MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect); |
| 751 | |
| 752 | /* Set the current technique to be used an effect. |
| 753 | * |
| 754 | * This function maps to ID3DXEffect::SetTechnique. |
| 755 | * |
| 756 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 757 | * (technique) is the technique to be used by the effect when rendered. |
| 758 | * |
| 759 | * This function is thread safe. |
| 760 | */ |
| 761 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_effectSetTechniquecxx . . $ MOJOSHADER_effectSetTechnique(df35503d530fdafc).(MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect, |
| 762 | const MOJOSHADER_effectTechniquecxx . . $ MOJOSHADER_effectTechnique# *technique); |
| 763 | |
| 764 | /* Get the next technique in an effect's list. |
| 765 | * |
| 766 | * This function maps to ID3DXEffect::FindNextValidTechnique. |
| 767 | * |
| 768 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 769 | * (technique) can either be a technique found in the given effect, or NULL to |
| 770 | * find the first technique in the given effect. |
| 771 | * |
| 772 | * This function returns either the next technique after the passed technique, |
| 773 | * or the first technique if the passed technique is NULL. |
| 774 | * |
| 775 | * This function is thread safe. |
| 776 | */ |
| 777 | DECLSPECcxx . . $ `<built-in>:410:9`! const MOJOSHADER_effectTechniquecxx . . $ MOJOSHADER_effectTechnique# *MOJOSHADER_effectFindNextValidTechniquecxx . . $ MOJOSHADER_effectFindNextValidTechnique(c018ddc13d789ea1).(const MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect, |
| 778 | const MOJOSHADER_effectTechniquecxx . . $ MOJOSHADER_effectTechnique# *technique); |
| 779 | |
| 780 | |
| 781 | /* Effect rendering interface... */ |
| 782 | |
| 783 | /* Prepare the effect for rendering with the currently applied technique. |
| 784 | * |
| 785 | * This function maps to ID3DXEffect::Begin. |
| 786 | * |
| 787 | * In addition to the expected Begin parameters, we also include a parameter |
| 788 | * to pass in a MOJOSHADER_effectRenderState. Rather than change the render |
| 789 | * state within MojoShader itself we will simply provide what the effect wants |
| 790 | * and allow you to use this information with your own renderer. |
| 791 | * MOJOSHADER_effectBeginPass will update with the render state desired by |
| 792 | * the current effect pass. |
| 793 | * |
| 794 | * Note that we only provide the ability to preserve the shader state, but NOT |
| 795 | * the ability to preserve the render/sampler states. You are expected to |
| 796 | * track your own GL state and restore these states as needed for your |
| 797 | * application. |
| 798 | * |
| 799 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 800 | * (numPasses) will be filled with the number of passes that this technique |
| 801 | * will need to fully render. |
| 802 | * (saveShaderState) is a boolean value informing the effect whether or not to |
| 803 | * restore the shader bindings after calling MOJOSHADER_effectEnd. |
| 804 | * (renderState) will be filled by the effect to inform you of the render state |
| 805 | * changes introduced by the technique and its passes. |
| 806 | * |
| 807 | * This call is only as thread safe as the backend functions! |
| 808 | */ |
| 809 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_effectBegincxx . . $ MOJOSHADER_effectBegin(4975cb7b61e35e91).(MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect, |
| 810 | unsigned int *numPasses, |
| 811 | int saveShaderState, |
| 812 | MOJOSHADER_effectStateChangescxx . . $ MOJOSHADER_effectStateChanges# *stateChanges); |
| 813 | |
| 814 | /* Begin an effect pass from the currently applied technique. |
| 815 | * |
| 816 | * This function maps to ID3DXEffect::BeginPass. |
| 817 | * |
| 818 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 819 | * (pass) is the index of the effect pass as found in the current technique. |
| 820 | * |
| 821 | * This call is only as thread safe as the backend functions! |
| 822 | */ |
| 823 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_effectBeginPasscxx . . $ MOJOSHADER_effectBeginPass(e53f884d00e56ec5).(MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect, |
| 824 | unsigned int pass); |
| 825 | |
| 826 | /* Push render state changes that occurred within an actively rendering pass. |
| 827 | * |
| 828 | * This function maps to ID3DXEffect::CommitChanges. |
| 829 | * |
| 830 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 831 | * |
| 832 | * This call is only as thread safe as the backend functions! |
| 833 | */ |
| 834 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_effectCommitChangescxx . . $ MOJOSHADER_effectCommitChanges(52f30deda1cbface).(MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect); |
| 835 | |
| 836 | /* End an effect pass from the currently applied technique. |
| 837 | * |
| 838 | * This function maps to ID3DXEffect::EndPass. |
| 839 | * |
| 840 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 841 | * |
| 842 | * This call is only as thread safe as the backend functions! |
| 843 | */ |
| 844 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_effectEndPasscxx . . $ MOJOSHADER_effectEndPass(52f30deda1cbface).(MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect); |
| 845 | |
| 846 | /* Complete rendering the effect technique, and restore the render state. |
| 847 | * |
| 848 | * This function maps to ID3DXEffect::End. |
| 849 | * |
| 850 | * (effect) is a MOJOSHADER_effect* obtained from MOJOSHADER_compileEffect(). |
| 851 | * |
| 852 | * This call is only as thread safe as the backend functions! |
| 853 | */ |
| 854 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_effectEndcxx . . $ MOJOSHADER_effectEnd(52f30deda1cbface).(MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect); |
| 855 | |
| 856 | |
| 857 | /* Profile-specific functions... */ |
| 858 | |
| 859 | /* |
| 860 | * Compile a MTLLibrary that contains all shaders of the given effect. |
| 861 | * |
| 862 | * This call requires a valid MOJOSHADER_mtlContext to have been created, |
| 863 | * or it will crash your program. See MOJOSHADER_mtlCreateContext(). |
| 864 | * |
| 865 | * Returns NULL on error, the generated MTLLibrary on success. |
| 866 | */ |
| 867 | DECLSPECcxx . . $ `<built-in>:410:9`! void *MOJOSHADER_mtlCompileLibrarycxx . . $ MOJOSHADER_mtlCompileLibrary(f0ab98f0e65b0c10).(MOJOSHADER_effectcxx . . $ MOJOSHADER_effect# *effect); |
| 868 | |
| 869 | /* |
| 870 | * Free the MTLLibrary given by (library). |
| 871 | */ |
| 872 | DECLSPECcxx . . $ `<built-in>:410:9`! void MOJOSHADER_mtlDeleteLibrarycxx . . $ MOJOSHADER_mtlDeleteLibrary(5d22bdacc48458e8).(void *library); |
| 873 | |
| 874 | |
| 875 | #endif /* MOJOSHADER_EFFECT_SUPPORT */ |
| 876 | |
| 877 | #endif /* MOJOSHADER_EFFECTS_H */ |