buffer setData tweak and pin depthstenciltargetdescription
parent
55d8e5a1df
commit
9e4007f9f0
|
@ -22,8 +22,8 @@ namespace MoonWorks.Graphics
|
|||
}
|
||||
|
||||
public unsafe void SetData<T>(
|
||||
uint offsetInBytes,
|
||||
T[] data,
|
||||
uint offsetInBytes,
|
||||
uint dataLengthInBytes
|
||||
) where T : unmanaged
|
||||
{
|
||||
|
@ -55,12 +55,11 @@ namespace MoonWorks.Graphics
|
|||
}
|
||||
}
|
||||
|
||||
public void SetData<T>(
|
||||
uint offsetInBytes,
|
||||
public void SetData(
|
||||
IntPtr data,
|
||||
uint offsetInBytes,
|
||||
uint dataLengthInBytes
|
||||
) where T : unmanaged
|
||||
{
|
||||
) {
|
||||
Refresh.Refresh_SetBufferData(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
|
@ -70,6 +69,20 @@ namespace MoonWorks.Graphics
|
|||
);
|
||||
}
|
||||
|
||||
public unsafe void SetData<T>(
|
||||
T* data,
|
||||
uint offsetInBytes,
|
||||
uint dataLengthInBytes
|
||||
) where T : unmanaged {
|
||||
Refresh.Refresh_SetBufferData(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
offsetInBytes,
|
||||
(IntPtr) data,
|
||||
dataLengthInBytes
|
||||
);
|
||||
}
|
||||
|
||||
// NOTE: You want to wait on the device before calling this
|
||||
public unsafe void GetData<T>(
|
||||
T[] data,
|
||||
|
|
|
@ -25,12 +25,12 @@ namespace MoonWorks.Graphics
|
|||
|
||||
public unsafe RenderPass(
|
||||
GraphicsDevice device,
|
||||
DepthStencilTargetDescription depthStencilTargetDescription,
|
||||
in DepthStencilTargetDescription depthStencilTargetDescription,
|
||||
params ColorTargetDescription[] colorTargetDescriptions
|
||||
) : base(device)
|
||||
{
|
||||
DepthStencilTargetDescription* depthStencilPtr = &depthStencilTargetDescription;
|
||||
|
||||
fixed (DepthStencilTargetDescription* depthStencilPtr = &depthStencilTargetDescription)
|
||||
fixed (ColorTargetDescription* colorPtr = colorTargetDescriptions)
|
||||
{
|
||||
Refresh.RenderPassCreateInfo renderPassCreateInfo;
|
||||
|
|
Loading…
Reference in New Issue