2022-02-23 05:14:32 +00:00
|
|
|
|
using System;
|
2021-01-20 03:33:27 +00:00
|
|
|
|
using RefreshCS;
|
|
|
|
|
|
|
|
|
|
namespace MoonWorks.Graphics
|
|
|
|
|
{
|
2022-02-23 05:14:32 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A sampler specifies how a texture will be sampled in a shader.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class Sampler : GraphicsResource
|
|
|
|
|
{
|
2022-03-04 01:16:39 +00:00
|
|
|
|
protected override Action<IntPtr, IntPtr> QueueDestroyFunction => Refresh.Refresh_QueueDestroySampler;
|
2021-01-20 03:33:27 +00:00
|
|
|
|
|
2022-02-23 05:14:32 +00:00
|
|
|
|
public Sampler(
|
|
|
|
|
GraphicsDevice device,
|
|
|
|
|
in SamplerCreateInfo samplerCreateInfo
|
|
|
|
|
) : base(device)
|
|
|
|
|
{
|
|
|
|
|
Handle = Refresh.Refresh_CreateSampler(
|
|
|
|
|
device.Handle,
|
|
|
|
|
samplerCreateInfo.ToRefreshSamplerStateCreateInfo()
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-01-20 03:33:27 +00:00
|
|
|
|
}
|