equal
deleted
inserted
replaced
684 object->shader.technique = -1; |
684 object->shader.technique = -1; |
685 object->shader.pass = -1; |
685 object->shader.pass = -1; |
686 object->shader.shader = effect->ctx.compileShader(mainfn, *ptr, length, |
686 object->shader.shader = effect->ctx.compileShader(mainfn, *ptr, length, |
687 swiz, swizcount, |
687 swiz, swizcount, |
688 smap, smapcount); |
688 smap, smapcount); |
|
689 if (object->shader.shader == NULL) |
|
690 { |
|
691 // Bail ASAP, so we can get the error to the application |
|
692 errorlist_add(errors, NULL, 0, effect->ctx.getError()); |
|
693 return; |
|
694 } // if |
689 pd = effect->ctx.getParseData(object->shader.shader); |
695 pd = effect->ctx.getParseData(object->shader.shader); |
690 if (pd->error_count > 0) |
696 if (pd->error_count > 0) |
691 { |
697 { |
692 // Bail ASAP, so we can get the error to the application |
698 // Bail ASAP, so we can get the error to the application |
693 push_errors(errors, pd->errors, pd->error_count); |
699 push_errors(errors, pd->errors, pd->error_count); |
814 char mainfn[32]; |
820 char mainfn[32]; |
815 snprintf(mainfn, sizeof (mainfn), "ShaderFunction%u", (unsigned int) objectIndex); |
821 snprintf(mainfn, sizeof (mainfn), "ShaderFunction%u", (unsigned int) objectIndex); |
816 object->shader.shader = effect->ctx.compileShader(mainfn, *ptr, length, |
822 object->shader.shader = effect->ctx.compileShader(mainfn, *ptr, length, |
817 swiz, swizcount, |
823 swiz, swizcount, |
818 smap, smapcount); |
824 smap, smapcount); |
|
825 if (object->shader.shader == NULL) |
|
826 { |
|
827 // Bail ASAP, so we can get the error to the application |
|
828 errorlist_add(errors, NULL, 0, effect->ctx.getError()); |
|
829 return; |
|
830 } // if |
819 pd = effect->ctx.getParseData(object->shader.shader); |
831 pd = effect->ctx.getParseData(object->shader.shader); |
820 if (pd->error_count > 0) |
832 if (pd->error_count > 0) |
821 { |
833 { |
822 // Bail ASAP, so we can get the error to the application |
834 // Bail ASAP, so we can get the error to the application |
823 push_errors(errors, pd->errors, pd->error_count); |
835 push_errors(errors, pd->errors, pd->error_count); |