mojoshader_effects.c
changeset 1185 7ff14b0252a0
parent 1183 ec44ee868688
child 1186 b5c8483ff647
equal deleted inserted replaced
1184:62922fc6abe9 1185:7ff14b0252a0
   663                                         effect->param_count,
   663                                         effect->param_count,
   664                                         object->shader.shader->symbols[j].name);
   664                                         object->shader.shader->symbols[j].name);
   665                 object->shader.params[j] = par;
   665                 object->shader.params[j] = par;
   666                 if (object->shader.shader->symbols[j].register_set == MOJOSHADER_SYMREGSET_SAMPLER)
   666                 if (object->shader.shader->symbols[j].register_set == MOJOSHADER_SYMREGSET_SAMPLER)
   667                 {
   667                 {
   668                     object->shader.samplers[curSampler].sampler_name = object->shader.shader->symbols[j].name;
   668                     object->shader.samplers[curSampler].sampler_name = effect->params[par].value.name;
   669                     object->shader.samplers[curSampler].sampler_register = object->shader.shader->symbols[j].register_index;
   669                     object->shader.samplers[curSampler].sampler_register = object->shader.shader->symbols[j].register_index;
   670                     object->shader.samplers[curSampler].sampler_state_count = effect->params[par].value.value_count;
   670                     object->shader.samplers[curSampler].sampler_state_count = effect->params[par].value.value_count;
   671                     object->shader.samplers[curSampler].sampler_states = effect->params[par].value.valuesSS;
   671                     object->shader.samplers[curSampler].sampler_states = effect->params[par].value.valuesSS;
   672                     curSampler++;
   672                     curSampler++;
   673                 } // if
   673                 } // if
   785                                             effect->param_count,
   785                                             effect->param_count,
   786                                             object->shader.shader->symbols[j].name);
   786                                             object->shader.shader->symbols[j].name);
   787                     object->shader.params[j] = par;
   787                     object->shader.params[j] = par;
   788                     if (object->shader.shader->symbols[j].register_set == MOJOSHADER_SYMREGSET_SAMPLER)
   788                     if (object->shader.shader->symbols[j].register_set == MOJOSHADER_SYMREGSET_SAMPLER)
   789                     {
   789                     {
   790                         object->shader.samplers[curSampler].sampler_name = object->shader.shader->symbols[j].name;
   790                         object->shader.samplers[curSampler].sampler_name = effect->params[par].value.name;
   791                         object->shader.samplers[curSampler].sampler_register = object->shader.shader->symbols[j].register_index;
   791                         object->shader.samplers[curSampler].sampler_register = object->shader.shader->symbols[j].register_index;
   792                         object->shader.samplers[curSampler].sampler_state_count = effect->params[par].value.value_count;
   792                         object->shader.samplers[curSampler].sampler_state_count = effect->params[par].value.value_count;
   793                         object->shader.samplers[curSampler].sampler_states = effect->params[par].value.valuesSS;
   793                         object->shader.samplers[curSampler].sampler_states = effect->params[par].value.valuesSS;
   794                         curSampler++;
   794                         curSampler++;
   795                     } // if
   795                     } // if
  1620                 goto cloneEffect_outOfMemory;
  1620                 goto cloneEffect_outOfMemory;
  1621             curSampler = 0;
  1621             curSampler = 0;
  1622             for (j = 0; j < clone->objects[i].shader.shader->symbol_count; j++)
  1622             for (j = 0; j < clone->objects[i].shader.shader->symbol_count; j++)
  1623                 if (clone->objects[i].shader.shader->symbols[j].register_set == MOJOSHADER_SYMREGSET_SAMPLER)
  1623                 if (clone->objects[i].shader.shader->symbols[j].register_set == MOJOSHADER_SYMREGSET_SAMPLER)
  1624                 {
  1624                 {
  1625                     clone->objects[i].shader.samplers[curSampler].sampler_name = clone->objects[i].shader.shader->symbols[j].name;
  1625                     clone->objects[i].shader.samplers[curSampler].sampler_name = clone->params[clone->objects[i].shader.params[j]].value.name;
  1626                     clone->objects[i].shader.samplers[curSampler].sampler_register = clone->objects[i].shader.shader->symbols[j].register_index;
  1626                     clone->objects[i].shader.samplers[curSampler].sampler_register = clone->objects[i].shader.shader->symbols[j].register_index;
  1627                     clone->objects[i].shader.samplers[curSampler].sampler_state_count = clone->params[clone->objects[i].shader.params[j]].value.value_count;
  1627                     clone->objects[i].shader.samplers[curSampler].sampler_state_count = clone->params[clone->objects[i].shader.params[j]].value.value_count;
  1628                     clone->objects[i].shader.samplers[curSampler].sampler_states = clone->params[clone->objects[i].shader.params[j]].value.valuesSS;
  1628                     clone->objects[i].shader.samplers[curSampler].sampler_states = clone->params[clone->objects[i].shader.params[j]].value.valuesSS;
  1629                     curSampler++;
  1629                     curSampler++;
  1630                 } // if
  1630                 } // if