Beispiel #1
0
	//-----------------------------------------------------------------------------
	void GLSLGpuProgram::bindProgramParameters(GpuProgramParametersSharedPtr params, uint16 mask)
	{
		// link can throw exceptions, ignore them at this point
		try
		{
			// activate the link program object
			GLSLLinkProgram* linkProgram = GLSLLinkProgramManager::getSingleton().getActiveLinkProgram();
			// pass on parameters from params to program object uniforms
			linkProgram->updateUniforms(params, mask, mType);
		}
		catch (Exception& e) {}
	
	}
Beispiel #2
0
	//-----------------------------------------------------------------------------
	void GLSLGpuProgram::bindProgramParameters(GpuProgramParametersSharedPtr params, uint16 mask)
	{
		// Link can throw exceptions, ignore them at this point
		try
		{
            if(Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_SEPARATE_SHADER_OBJECTS))
            {
                // Activate the program pipeline object
                GLSLProgramPipeline* programPipeline = GLSLProgramPipelineManager::getSingleton().getActiveProgramPipeline();
                // Pass on parameters from params to program object uniforms
                programPipeline->updateUniforms(params, mask, mType);
            }
            else
            {
                // Activate the link program object
                GLSLLinkProgram* linkProgram = GLSLLinkProgramManager::getSingleton().getActiveLinkProgram();
                // Pass on parameters from params to program object uniforms
                linkProgram->updateUniforms(params, mask, mType);
            }
		}
		catch (Exception& e) {}
	}