fix begin render pass
parent
d1e691a02b
commit
dc59b851d4
|
@ -72,22 +72,32 @@ namespace MoonWorks.Graphics
|
|||
RenderPass renderPass,
|
||||
Framebuffer framebuffer,
|
||||
in Rect renderArea,
|
||||
params Color[] clearColors
|
||||
params Vector4[] clearColors
|
||||
) {
|
||||
fixed (Color* clearColorPtr = &clearColors[0])
|
||||
Refresh.Vec4* colors = stackalloc Refresh.Vec4[clearColors.Length];
|
||||
|
||||
for (var i = 0; i < clearColors.Length; i++)
|
||||
{
|
||||
colors[i] = new Refresh.Vec4
|
||||
{
|
||||
x = clearColors[i].X,
|
||||
y = clearColors[i].Y,
|
||||
z = clearColors[i].Z,
|
||||
w = clearColors[i].W
|
||||
};
|
||||
}
|
||||
|
||||
Refresh.Refresh_BeginRenderPass(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
renderPass.Handle,
|
||||
framebuffer.Handle,
|
||||
renderArea.ToRefresh(),
|
||||
(IntPtr) clearColorPtr,
|
||||
(IntPtr) colors,
|
||||
(uint) clearColors.Length,
|
||||
IntPtr.Zero
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public void BindComputePipeline(
|
||||
ComputePipeline computePipeline
|
||||
|
|
Loading…
Reference in New Issue