void InitInput() { var xrInput = CreateSubsystemIfNeeded <XRInputSubsystem, XRInputSubsystemDescriptor>(); MagicLeapLogger.AssertError(xrInput != null, kLogTag, "Failed to initialized XR Input"); xrInput.Start(); }
public XRMeshSubsystem InitMeshing() { if (!CanCreateSubsystems()) { return(null); } var xrMesh = CreateSubsystemIfNeeded <XRMeshSubsystem, XRMeshSubsystemDescriptor>(); MagicLeapLogger.AssertError(xrMesh != null, kLogTag, "Failed to initialized XR Meshing"); return(xrMesh); }
internal void StartMeshSubsystem() { if (!CanCreateMeshSubsystem()) { return; } //MagicLeapLogger.Debug(kLogTag, "m_MeshSubsystemRefcount: {0}", m_MeshSubsystemRefcount); m_MeshSubsystemRefcount += 1; //MagicLeapLogger.Debug(kLogTag, "m_MeshSubsystemRefcount: {0}", m_MeshSubsystemRefcount); if (m_MeshSubsystemRefcount == 1) { MagicLeapLogger.Debug(kLogTag, "Starting Mesh Subsystem"); StartSubsystem <XRMeshSubsystem>(); } }
private void ApplySettings() { var settings = MagicLeapSettings.currentSettings; if (settings != null) { // set depth buffer precision MagicLeapLogger.Debug(kLogTag, $"Setting Depth Precision: {settings.depthPrecision}"); Rendering.RenderingSettings.depthPrecision = settings.depthPrecision; // set frame timing hint MagicLeapLogger.Debug(kLogTag, $"Setting Frame Timing Hint: {settings.frameTimingHint}"); Rendering.RenderingSettings.frameTimingHint = settings.frameTimingHint; #if PLATFORM_LUMIN && !UNITY_EDITOR if (settings.glCacheSettings.enabled) { Graphics.SetupGLCache(settings.glCacheSettings); } #endif // PLATFORM_LUMIN && !UNITY_EDITOR } }
internal static void SetupGLCache(MagicLeapSettings.GLCache cacheSettings) { var result = EnableBlobCacheGL(cacheSettings.cachePath, cacheSettings.maxBlobSizeInBytes, cacheSettings.maxFileSizeInBytes); MagicLeapLogger.AssertError(result == 0, kLogTag, $"Failed to initialize blob cache ({cacheSettings.cachePath} / {cacheSettings.maxBlobSizeInBytes} / {cacheSettings.maxFileSizeInBytes})"); }