2026-04-17 21:53:52 +08:00
|
|
|
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);
|
|
|
|
|
|
2026-04-18 13:30:45 +08:00
|
|
|
public bool RecordScene()
|
2026-04-17 21:53:52 +08:00
|
|
|
{
|
|
|
|
|
return InternalCalls
|
2026-04-18 13:30:45 +08:00
|
|
|
.Rendering_ScriptableRenderContext_RecordScene(
|
2026-04-17 21:53:52 +08:00
|
|
|
m_nativeHandle);
|
|
|
|
|
}
|
2026-04-17 22:26:51 +08:00
|
|
|
|
2026-04-18 13:30:45 +08:00
|
|
|
public bool RenderScene()
|
2026-04-17 22:26:51 +08:00
|
|
|
{
|
2026-04-18 13:30:45 +08:00
|
|
|
return RecordScene();
|
2026-04-17 22:26:51 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-18 13:30:45 +08:00
|
|
|
public bool RecordScenePhase(ScenePhase scenePhase)
|
2026-04-17 22:26:51 +08:00
|
|
|
{
|
|
|
|
|
return InternalCalls
|
2026-04-18 13:30:45 +08:00
|
|
|
.Rendering_ScriptableRenderContext_RecordScenePhase(
|
2026-04-17 22:26:51 +08:00
|
|
|
m_nativeHandle,
|
|
|
|
|
(int)scenePhase);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-18 13:30:45 +08:00
|
|
|
public bool RecordSceneInjectionPoint(
|
2026-04-17 22:26:51 +08:00
|
|
|
SceneRenderInjectionPoint injectionPoint)
|
|
|
|
|
{
|
|
|
|
|
return InternalCalls
|
2026-04-18 13:30:45 +08:00
|
|
|
.Rendering_ScriptableRenderContext_RecordSceneInjectionPoint(
|
2026-04-17 22:26:51 +08:00
|
|
|
m_nativeHandle,
|
|
|
|
|
(int)injectionPoint);
|
|
|
|
|
}
|
2026-04-17 22:58:39 +08:00
|
|
|
|
2026-04-18 13:30:45 +08:00
|
|
|
public bool RecordColorScaleFullscreenPass(
|
2026-04-17 22:58:39 +08:00
|
|
|
Vector4 colorScale)
|
|
|
|
|
{
|
|
|
|
|
return InternalCalls
|
2026-04-18 13:30:45 +08:00
|
|
|
.Rendering_ScriptableRenderContext_RecordColorScaleFullscreenPass(
|
2026-04-17 22:58:39 +08:00
|
|
|
m_nativeHandle,
|
|
|
|
|
ref colorScale);
|
|
|
|
|
}
|
2026-04-17 21:53:52 +08:00
|
|
|
}
|
|
|
|
|
}
|