3 using SiliconStudio.Core.ReferenceCounting;
4 using SiliconStudio.Core.Serialization.Contents;
6 namespace SiliconStudio.
Paradox.Graphics
8 [ContentSerializer(typeof(SamplerStateSerializer))]
24 Description = description;
31 lock (graphicsDevice.CachedSamplerStates)
33 if (graphicsDevice.CachedSamplerStates.TryGetValue(samplerStateDescription, out samplerState))
36 samplerState.AddReferenceInternal();
40 samplerState =
new SamplerState(graphicsDevice, samplerStateDescription);
41 graphicsDevice.CachedSamplerStates.Add(samplerStateDescription, samplerState);
51 GraphicsDevice.CachedSamplerStates.Remove(Description);
SamplerState(SamplerStateDescription description)
override void Destroy()
Disposes of object resources.
Describes a sampler state.
static SamplerState New(GraphicsDevice graphicsDevice, SamplerStateDescription samplerStateDescription)
Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders. See The+GraphicsDevice+class to learn more about the class.
readonly SamplerStateDescription Description
Gets the sampler state description.