2025-04-23 12:00:43 +00:00
|
|
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
2025-05-10 20:56:23 +00:00
|
|
|
public class RDPipeline: RDObject
|
2025-04-23 12:00:43 +00:00
|
|
|
{
|
2025-04-26 20:04:11 +00:00
|
|
|
public RDPipeline( RDContext context, Rid rid ):base( context, rid )
|
2025-04-23 12:00:43 +00:00
|
|
|
{}
|
|
|
|
|
2025-09-21 07:35:17 +00:00
|
|
|
public static RDPipeline CreateCompute( RDContext context, RDShader shader )
|
2025-04-23 12:00:43 +00:00
|
|
|
{
|
2025-04-26 20:04:11 +00:00
|
|
|
return new RDPipeline( context, context.renderingDevice.ComputePipelineCreate( shader.rid ) );
|
2025-04-23 12:00:43 +00:00
|
|
|
}
|
2025-09-21 07:35:17 +00:00
|
|
|
|
|
|
|
public static RDPipeline CreateRender( RDContext context, RDShader shader, RDRenderPipelineSetup setup )
|
|
|
|
{
|
|
|
|
var pipelineRid = context.renderingDevice.RenderPipelineCreate(
|
|
|
|
shader.rid, setup.frameBufferFormat.id, setup.vertexFormat.id,
|
|
|
|
setup.primitive, setup.rasterizationState,
|
|
|
|
setup.multisampleState,
|
|
|
|
setup.stencilState, setup.blendState
|
|
|
|
);
|
|
|
|
|
|
|
|
return new RDPipeline( context, pipelineRid );
|
|
|
|
}
|
2025-04-23 12:00:43 +00:00
|
|
|
}
|
|
|
|
}
|