forked from MoonsideGames/MoonWorks
fix begin render pass
parent
d1e691a02b
commit
dc59b851d4
|
@ -72,21 +72,31 @@ namespace MoonWorks.Graphics
|
||||||
RenderPass renderPass,
|
RenderPass renderPass,
|
||||||
Framebuffer framebuffer,
|
Framebuffer framebuffer,
|
||||||
in Rect renderArea,
|
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++)
|
||||||
{
|
{
|
||||||
Refresh.Refresh_BeginRenderPass(
|
colors[i] = new Refresh.Vec4
|
||||||
Device.Handle,
|
{
|
||||||
Handle,
|
x = clearColors[i].X,
|
||||||
renderPass.Handle,
|
y = clearColors[i].Y,
|
||||||
framebuffer.Handle,
|
z = clearColors[i].Z,
|
||||||
renderArea.ToRefresh(),
|
w = clearColors[i].W
|
||||||
(IntPtr) clearColorPtr,
|
};
|
||||||
(uint) clearColors.Length,
|
|
||||||
IntPtr.Zero
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Refresh.Refresh_BeginRenderPass(
|
||||||
|
Device.Handle,
|
||||||
|
Handle,
|
||||||
|
renderPass.Handle,
|
||||||
|
framebuffer.Handle,
|
||||||
|
renderArea.ToRefresh(),
|
||||||
|
(IntPtr) colors,
|
||||||
|
(uint) clearColors.Length,
|
||||||
|
IntPtr.Zero
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BindComputePipeline(
|
public void BindComputePipeline(
|
||||||
|
|
Loading…
Reference in New Issue