atlas.Upload( atlasDescriptor.mFilledPixelImage, 0, 0 );
Sampler sampler = Sampler::New( atlas, "sTexture" );
- sampler.SetFilterMode( Sampler::NEAREST, Sampler::NEAREST );
sampler.SetProperty( Sampler::Property::AFFECTS_TRANSPARENCY, true );
Shader shader;
if ( pixelformat == Pixel::BGRA8888 )
}
atlasDescriptor.mMaterial = Material::New( shader );
atlasDescriptor.mMaterial.AddSampler( sampler );
+ atlasDescriptor.mSampler = sampler;
atlasDescriptor.mMaterial.SetBlendMode( BlendingMode::ON );
mAtlasList.push_back( atlasDescriptor );
return mAtlasList.size();
return null;
}
+Sampler AtlasManager::GetSampler( AtlasId atlas ) const
+{
+ if ( atlas && atlas <= mAtlasList.size() )
+ {
+ return mAtlasList[ atlas -1u ].mSampler;
+ }
+ Sampler null;
+ return null;
+}
+
} // namespace Internal
} // namespace Toolkit