mojoshader_effects.c
changeset 1104 9147482e1ec7
parent 1074 3fdc7cbd0c37
child 1150 02c0f0afb39a
equal deleted inserted replaced
1103:8b7c29c019d5 1104:9147482e1ec7
   206 const MOJOSHADER_effect *MOJOSHADER_parseEffect(const char *profile,
   206 const MOJOSHADER_effect *MOJOSHADER_parseEffect(const char *profile,
   207                                                 const unsigned char *buf,
   207                                                 const unsigned char *buf,
   208                                                 const unsigned int _len,
   208                                                 const unsigned int _len,
   209                                                 const MOJOSHADER_swizzle *swiz,
   209                                                 const MOJOSHADER_swizzle *swiz,
   210                                                 const unsigned int swizcount,
   210                                                 const unsigned int swizcount,
       
   211                                                 const MOJOSHADER_samplerMap *smap,
       
   212                                                 const unsigned int smapcount,
   211                                                 MOJOSHADER_malloc m,
   213                                                 MOJOSHADER_malloc m,
   212                                                 MOJOSHADER_free f,
   214                                                 MOJOSHADER_free f,
   213                                                 void *d)
   215                                                 void *d)
   214 {
   216 {
   215     if ( ((m == NULL) && (f != NULL)) || ((m != NULL) && (f == NULL)) )
   217     if ( ((m == NULL) && (f != NULL)) || ((m != NULL) && (f == NULL)) )
   513                 goto parseEffect_unexpectedEOF;
   515                 goto parseEffect_unexpectedEOF;
   514 
   516 
   515             shader->technique = technique;
   517             shader->technique = technique;
   516             shader->pass = pass;
   518             shader->pass = pass;
   517             shader->shader = MOJOSHADER_parse(profile, ptr, shadersize,
   519             shader->shader = MOJOSHADER_parse(profile, ptr, shadersize,
   518                                               swiz, swizcount, m, f, d);
   520                                               swiz, swizcount, smap, smapcount,
       
   521                                               m, f, d);
   519 
   522 
   520             // !!! FIXME: check for errors.
   523             // !!! FIXME: check for errors.
   521 
   524 
   522             ptr += shadersize;
   525             ptr += shadersize;
   523             len -= shadersize;
   526             len -= shadersize;