66 lines
1.8 KiB
C#
66 lines
1.8 KiB
C#
using System;
|
|
|
|
namespace XCEngine
|
|
{
|
|
public sealed class ScriptableRenderContext
|
|
{
|
|
private readonly ulong m_nativeHandle;
|
|
|
|
internal ScriptableRenderContext(ulong nativeHandle)
|
|
{
|
|
m_nativeHandle = nativeHandle;
|
|
}
|
|
|
|
public CameraFrameStage stage =>
|
|
(CameraFrameStage)InternalCalls.Rendering_ScriptableRenderContext_GetStage(
|
|
m_nativeHandle);
|
|
|
|
public bool RecordScene()
|
|
{
|
|
return InternalCalls
|
|
.Rendering_ScriptableRenderContext_RecordScene(
|
|
m_nativeHandle);
|
|
}
|
|
|
|
public bool RenderScene()
|
|
{
|
|
return RecordScene();
|
|
}
|
|
|
|
public bool RecordScenePhase(ScenePhase scenePhase)
|
|
{
|
|
return InternalCalls
|
|
.Rendering_ScriptableRenderContext_RecordScenePhase(
|
|
m_nativeHandle,
|
|
(int)scenePhase);
|
|
}
|
|
|
|
public bool RecordSceneInjectionPoint(
|
|
SceneRenderInjectionPoint injectionPoint)
|
|
{
|
|
return InternalCalls
|
|
.Rendering_ScriptableRenderContext_RecordSceneInjectionPoint(
|
|
m_nativeHandle,
|
|
(int)injectionPoint);
|
|
}
|
|
|
|
public bool RecordFullscreenPass(
|
|
FullscreenPassDescriptor pass)
|
|
{
|
|
if (!pass.IsValid())
|
|
{
|
|
throw new ArgumentException(
|
|
"Invalid fullscreen pass descriptor.",
|
|
nameof(pass));
|
|
}
|
|
|
|
Vector4 vectorPayload = pass.vectorPayload;
|
|
return InternalCalls
|
|
.Rendering_ScriptableRenderContext_RecordFullscreenPass(
|
|
m_nativeHandle,
|
|
(int)pass.type,
|
|
ref vectorPayload);
|
|
}
|
|
}
|
|
}
|