2022-02-23 05:14:32 +00:00
|
|
|
|
using System;
|
2024-06-05 19:34:24 +00:00
|
|
|
|
using RefreshCS;
|
2021-01-20 03:33:27 +00:00
|
|
|
|
|
2024-06-05 02:35:17 +00:00
|
|
|
|
namespace MoonWorks.Graphics;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A sampler specifies how a texture will be sampled in a shader.
|
|
|
|
|
/// </summary>
|
2024-06-05 19:34:24 +00:00
|
|
|
|
public class Sampler : RefreshResource
|
2021-01-20 03:33:27 +00:00
|
|
|
|
{
|
2024-06-05 19:34:24 +00:00
|
|
|
|
protected override Action<IntPtr, IntPtr> ReleaseFunction => Refresh.Refresh_ReleaseSampler;
|
2021-01-20 03:33:27 +00:00
|
|
|
|
|
2024-06-05 02:35:17 +00:00
|
|
|
|
public Sampler(
|
|
|
|
|
GraphicsDevice device,
|
|
|
|
|
in SamplerCreateInfo samplerCreateInfo
|
|
|
|
|
) : base(device)
|
|
|
|
|
{
|
2024-06-05 19:34:24 +00:00
|
|
|
|
Handle = Refresh.Refresh_CreateSampler(
|
2024-06-05 02:35:17 +00:00
|
|
|
|
device.Handle,
|
2024-06-05 19:34:24 +00:00
|
|
|
|
samplerCreateInfo.ToRefresh()
|
2024-06-05 02:35:17 +00:00
|
|
|
|
);
|
2022-02-23 05:14:32 +00:00
|
|
|
|
}
|
2021-01-20 03:33:27 +00:00
|
|
|
|
}
|