//--------------------------------------------------------------------------- GpuProgramPtr GpuProgramManager::createProgramFromString(const String& name, const String& groupName, const String& code, GpuProgramType gptype, const String& syntaxCode) { GpuProgramPtr prg = create(name, groupName, gptype, syntaxCode); // Set all prarmeters (create does not set, just determines factory) prg->setType(gptype); prg->setSyntaxCode(syntaxCode); prg->setSource(code); return prg; }
//--------------------------------------------------------------------------- GpuProgramPtr GpuProgramManager::createProgram(const String& name, const String& groupName, const String& filename, GpuProgramType gptype, const String& syntaxCode) { GpuProgramPtr prg = create(name, groupName, gptype, syntaxCode).staticCast<GpuProgram>(); // Set all prarmeters (create does not set, just determines factory) prg->setType(gptype); prg->setSyntaxCode(syntaxCode); prg->setSourceFile(filename); return prg; }