mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-04-24 08:19:49 -04:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
50 lines
946 B
C#
50 lines
946 B
C#
using NativeEngine;
|
|
|
|
namespace Sandbox.VR;
|
|
|
|
//
|
|
// Functions called from native
|
|
//
|
|
partial class VRSystem
|
|
{
|
|
internal static bool InternalIsActive()
|
|
{
|
|
return IsActive;
|
|
}
|
|
|
|
internal static bool InternalWantsInit()
|
|
{
|
|
return WantsInit;
|
|
}
|
|
|
|
internal static void BeginFrame()
|
|
{
|
|
VRNative.BeginFrame();
|
|
}
|
|
|
|
internal static void EndFrame()
|
|
{
|
|
VRNative.EndFrame();
|
|
}
|
|
|
|
internal static bool Submit( IntPtr pColorTexture, IntPtr pDepthTexture )
|
|
{
|
|
var colorTexture = new ITexture( pColorTexture );
|
|
var depthTexture = new ITexture( pDepthTexture );
|
|
|
|
return VRNative.Submit( colorTexture, depthTexture );
|
|
}
|
|
|
|
internal static string GetVulkanInstanceExtensionsRequired()
|
|
{
|
|
var list = VRNative.GetVulkanInstanceExtensionsRequired();
|
|
return string.Join( " ", list );
|
|
}
|
|
|
|
internal static string GetVulkanDeviceExtensionsRequired()
|
|
{
|
|
var list = VRNative.GetVulkanDeviceExtensionsRequired();
|
|
return string.Join( " ", list );
|
|
}
|
|
}
|