Campari/src/Sampler.cs

24 lines
613 B
C#
Raw Permalink Normal View History

2021-01-15 01:25:15 +00:00
using System;
using RefreshCS;
namespace Campari
{
public class Sampler : GraphicsResource
{
protected override Action<IntPtr, IntPtr> QueueDestroyFunction => Refresh.Refresh_QueueDestroySampler;
public Sampler(
2021-01-16 02:13:53 +00:00
GraphicsDevice device,
2021-01-16 02:08:58 +00:00
ref SamplerState samplerState
2021-01-15 01:25:15 +00:00
) : base(device)
{
2021-01-16 02:08:58 +00:00
var refreshSamplerStateCreateInfo = samplerState.ToRefreshSamplerStateCreateInfo();
Handle = Refresh.Refresh_CreateSampler(
device.Handle,
ref refreshSamplerStateCreateInfo
);
2021-01-15 01:25:15 +00:00
}
}
}