2021-01-14 10:50:02 +00:00
|
|
|
|
using System;
|
|
|
|
|
using RefreshCS;
|
|
|
|
|
|
|
|
|
|
namespace Campari
|
|
|
|
|
{
|
2021-01-15 01:25:15 +00:00
|
|
|
|
public class DepthStencilTarget : GraphicsResource
|
2021-01-14 10:50:02 +00:00
|
|
|
|
{
|
|
|
|
|
public uint Width { get; }
|
|
|
|
|
public uint Height { get; }
|
|
|
|
|
public Refresh.DepthFormat Format { get; }
|
|
|
|
|
|
|
|
|
|
protected override Action<IntPtr, IntPtr> QueueDestroyFunction => Refresh.Refresh_QueueDestroyDepthStencilTarget;
|
|
|
|
|
|
2021-01-17 00:12:20 +00:00
|
|
|
|
public DepthStencilTarget(
|
|
|
|
|
GraphicsDevice device,
|
|
|
|
|
uint width,
|
|
|
|
|
uint height,
|
|
|
|
|
Refresh.DepthFormat depthFormat
|
|
|
|
|
) : base(device)
|
2021-01-14 10:50:02 +00:00
|
|
|
|
{
|
|
|
|
|
Handle = Refresh.Refresh_CreateDepthStencilTarget(device.Handle, width, height, depthFormat);
|
|
|
|
|
Width = width;
|
|
|
|
|
Height = height;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|