-------------------------------------------------------------------------
| 3018 | } |
| 3019 | //------------------------------------------------------------------------- |
| 3020 | void PassTranslator::translateGeometryProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node) |
| 3021 | { |
| 3022 | if(node->name.empty()) |
| 3023 | { |
| 3024 | compiler->addError(ScriptCompiler::CE_OBJECTNAMEEXPECTED, node->file, node->line); |
| 3025 | return; |
| 3026 | } |
| 3027 | |
| 3028 | ProcessResourceNameScriptCompilerEvent evt(ProcessResourceNameScriptCompilerEvent::GPU_PROGRAM, node->name); |
| 3029 | compiler->_fireEvent(&evt, 0); |
| 3030 | |
| 3031 | if (!GpuProgramManager::getSingleton().getByName(evt.mName)) |
| 3032 | { |
| 3033 | compiler->addError(ScriptCompiler::CE_REFERENCETOANONEXISTINGOBJECT, node->file, node->line); |
| 3034 | return; |
| 3035 | } |
| 3036 | |
| 3037 | Pass *pass = any_cast<Pass*>(node->parent->context); |
| 3038 | pass->setGeometryProgram(evt.mName); |
| 3039 | if(pass->getGeometryProgram()->isSupported()) |
| 3040 | { |
| 3041 | GpuProgramParametersSharedPtr params = pass->getGeometryProgramParameters(); |
| 3042 | GpuProgramTranslator::translateProgramParameters(compiler, params, node); |
| 3043 | } |
| 3044 | } |
| 3045 | //------------------------------------------------------------------------- |
| 3046 | void PassTranslator::translateTessellationHullProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node) |
| 3047 | { |
nothing calls this directly
no test coverage detected