Exemplo n.º 1
0
    //---------------------------------------------------------------------------
	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;
    }
Exemplo n.º 2
0
 //---------------------------------------------------------------------------
 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;
 }