当前位置: 首页>>代码示例>>C++>>正文


C++ GpuProgramParametersSharedPtr::get方法代码示例

本文整理汇总了C++中GpuProgramParametersSharedPtr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ GpuProgramParametersSharedPtr::get方法的具体用法?C++ GpuProgramParametersSharedPtr::get怎么用?C++ GpuProgramParametersSharedPtr::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GpuProgramParametersSharedPtr的用法示例。


在下文中一共展示了GpuProgramParametersSharedPtr::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: bind

//-----------------------------------------------------------------------
void UniformParameter::bind(GpuProgramParametersSharedPtr paramsPtr)
{	
	if (paramsPtr.get() != NULL)
	{
		const GpuConstantDefinition* def = paramsPtr->_findNamedConstantDefinition(mName);

		if (def != NULL)
		{
			mParamsPtr = paramsPtr.get();
			mPhysicalIndex = def->physicalIndex;
		}
	}
}
开发者ID:MrLobo,项目名称:El-Rayo-de-Zeus,代码行数:14,代码来源:OgreShaderParameter.cpp

示例2: recreateParameters

	//---------------------------------------------------------------------
	void GpuProgramUsage::recreateParameters()
	{
		// Keep a reference to old ones to copy
		GpuProgramParametersSharedPtr savedParams = mParameters;

		// Create new params
		mParameters = mProgram->createParameters();

		// Copy old (matching) values across
		// Don't use copyConstantsFrom since program may be different
		if (!savedParams.isNull())
			mParameters->copyMatchingNamedConstantsFrom(*savedParams.get());

		mRecreateParams = false;

	}
开发者ID:MrLobo,项目名称:El-Rayo-de-Zeus,代码行数:17,代码来源:OgreGpuProgramUsage.cpp

示例3: loadImpl

    //-----------------------------------------------------------------------------
    void GpuProgram::loadImpl(void)
    {
        if (mLoadFromFile)
        {
            // find & load source code
            DataStreamPtr stream = 
                ResourceGroupManager::getSingleton().openResource(
                    mFilename, mGroup, true, this);
            mSource = stream->getAsString();
        }

        // Call polymorphic load
        try 
        {
            loadFromSource();

            if (!mDefaultParams.isNull())
            {
                // Keep a reference to old ones to copy
                GpuProgramParametersSharedPtr savedParams = mDefaultParams;
                // reset params to stop them being referenced in the next create
                mDefaultParams.setNull();

                // Create new params
                mDefaultParams = createParameters();

                // Copy old (matching) values across
                // Don't use copyConstantsFrom since program may be different
                mDefaultParams->copyMatchingNamedConstantsFrom(*savedParams.get());

            }
        }
        catch (const Exception&)
        {
            StringStream ss;
            ss << "Gpu program " << mName << " encountered an error "
                << "during loading and is thus not supported.";
            
            mCompileErrorMessage = ss.str();
            // will already have been logged
            LogManager::getSingleton().stream() << mCompileErrorMessage;

            mCompileError = true;
        }

    }
开发者ID:whztt07,项目名称:ogre3d,代码行数:47,代码来源:OgreGpuProgram.cpp

示例4: loadHighLevel

    //---------------------------------------------------------------------------
    void HighLevelGpuProgram::loadHighLevel(void)
    {
        if (!mHighLevelLoaded)
        {
			try 
			{
				loadHighLevelImpl();
				mHighLevelLoaded = true;
				if (!mDefaultParams.isNull())
				{
					// Keep a reference to old ones to copy
					GpuProgramParametersSharedPtr savedParams = mDefaultParams;
					// reset params to stop them being referenced in the next create
					mDefaultParams.setNull();

					// Create new params
					mDefaultParams = createParameters();

					// Copy old (matching) values across
					// Don't use copyConstantsFrom since program may be different
					mDefaultParams->copyMatchingNamedConstantsFrom(*savedParams.get());

				}

			}
			catch (const Exception& e)
			{
				// will already have been logged
				LogManager::getSingleton().stream()
					<< "High-level program " << mName << " encountered an error "
					<< "during loading and is thus not supported.\n"
					<< e.getFullDescription();

				mCompileError = true;
			}
        }
    }
开发者ID:Bewolf2,项目名称:LearningGameAI,代码行数:38,代码来源:OgreHighLevelGpuProgram.cpp


注:本文中的GpuProgramParametersSharedPtr::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。