2026-04-21 18:05:33 +08:00
|
|
|
namespace XCEngine.Rendering
|
|
|
|
|
{
|
|
|
|
|
public sealed class RenderSceneSetupContext
|
|
|
|
|
{
|
|
|
|
|
private readonly ulong m_nativeHandle;
|
|
|
|
|
|
|
|
|
|
internal RenderSceneSetupContext(ulong nativeHandle)
|
|
|
|
|
{
|
|
|
|
|
m_nativeHandle = nativeHandle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int rendererIndex =>
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_GetRendererIndex(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
|
2026-04-21 21:42:03 +08:00
|
|
|
public Camera camera
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
ulong cameraGameObjectUUID =
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_GetCameraGameObjectUUID(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
if (cameraGameObjectUUID == 0)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GameObject gameObject =
|
|
|
|
|
new GameObject(cameraGameObjectUUID);
|
|
|
|
|
return gameObject.GetComponent<Camera>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-21 18:05:33 +08:00
|
|
|
public bool isConfigured =>
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_GetIsConfigured(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
|
|
|
|
|
public bool UseDefaultSceneSetup()
|
|
|
|
|
{
|
|
|
|
|
return InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_UseDefaultSceneSetup(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool UseDefaultEnvironment()
|
|
|
|
|
{
|
|
|
|
|
return InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_UseDefaultEnvironment(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool UseDefaultGlobalShaderKeywords()
|
|
|
|
|
{
|
|
|
|
|
return InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_UseDefaultGlobalShaderKeywords(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ClearEnvironment()
|
|
|
|
|
{
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_ClearEnvironment(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ClearGlobalShaderKeywords()
|
|
|
|
|
{
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_ClearGlobalShaderKeywords(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ClearSceneSetup()
|
|
|
|
|
{
|
|
|
|
|
InternalCalls
|
|
|
|
|
.Rendering_RenderSceneSetupContext_ClearSceneSetup(
|
|
|
|
|
m_nativeHandle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal ulong nativeHandle =>
|
|
|
|
|
m_nativeHandle;
|
|
|
|
|
}
|
|
|
|
|
}
|