Пример #1
0
      ParameterGroupDataSharedPtr createStandardBumpmapParameterData( const SamplerSharedPtr & sampler )
      {
        EffectSpecSharedPtr materialSpec = dp::fx::EffectLibrary::instance()->getEffectSpec("standardMaterialEffectBumped");
        EffectSpec::iterator groupSpecIt = materialSpec->findParameterGroupSpec( std::string( "standardBumpmapParameters" ) );
        DP_ASSERT( groupSpecIt != materialSpec->endParameterGroupSpecs() );

        ParameterGroupDataSharedPtr parameterData = ParameterGroupData::create( *groupSpecIt );
        DP_VERIFY( parameterData->setParameter( "bumpmapSampler", sampler ) );
        DP_VERIFY( parameterData->setParameter<bool>( "bumpmapEnable", !!sampler ) );
        return( parameterData );
      }
Пример #2
0
      ParameterGroupDataSharedPtr createStandardTextureParameterData( const SamplerSharedPtr & sampler )
      {
        EffectSpecSharedPtr materialSpec = getStandardMaterialSpec();
        EffectSpec::iterator groupSpecIt = materialSpec->findParameterGroupSpec( std::string( "standardTextureParameters" ) );
        DP_ASSERT( groupSpecIt != materialSpec->endParameterGroupSpecs() );

        ParameterGroupDataSharedPtr parameterData = ParameterGroupData::create( *groupSpecIt );
        DP_VERIFY( parameterData->setParameter( "sampler", sampler ) );
        DP_VERIFY( parameterData->setParameter<bool>( "textureEnable", !!sampler ) );
        return( parameterData );
      }