Use OpenGL render engine on non-Windows platforms

This commit is contained in:
Yoshi Askharoun
2026-07-25 23:30:54 -05:00
parent 95b6fba18f
commit b21401e3ab
4 changed files with 9 additions and 3 deletions
@@ -31,7 +31,7 @@ namespace Microsoft.Iris.Render.OpenGL
private SoundDeviceType m_soundType;
private volatile bool m_wakeRequested;
public GLRenderEngine(IrisEngineInfo engineInfo, IRenderHost renderHost)
public GLRenderEngine(EngineInfo engineInfo, IRenderHost renderHost)
{
m_host = renderHost;
+1 -1
View File
@@ -10,7 +10,7 @@ namespace Microsoft.Iris.Render.OpenGL
public static class OpenGLRenderApi
{
/// <summary>Create an OpenGL render engine for the given Iris engine info.</summary>
public static IRenderEngine CreateEngine(IrisEngineInfo engineInfo, IRenderHost renderHost)
public static IRenderEngine CreateEngine(EngineInfo engineInfo, IRenderHost renderHost)
{
// Explicit null checks (not ArgumentNullException.ThrowIfNull, which is net6+
// and does not exist on the net48 target).
+6 -1
View File
@@ -15,6 +15,7 @@ using Microsoft.Iris.Render;
using Microsoft.Iris.RenderAPI.Audio;
using Microsoft.Iris.UI;
using System;
using Microsoft.Iris.Render.OpenGL;
namespace Microsoft.Iris.Session
{
@@ -68,10 +69,14 @@ namespace Microsoft.Iris.Session
int pdwDefaultLayout = 0;
Win32Api.IFWIN32(Win32Api.GetProcessDefaultLayout(out pdwDefaultLayout));
_rtl = pdwDefaultLayout == 1;
_engine = RenderApi.CreateEngine(IrisEngineInfo.CreateLocal(), Dispatcher);
#else
_rtl = false;
_engine = OpenGLRenderApi.CreateEngine(IrisEngineInfo.CreateLocal(), Dispatcher);
#endif
_engine = RenderApi.CreateEngine(IrisEngineInfo.CreateLocal(), Dispatcher);
_session = _engine.Session;
TextImageCache.Initialize(this);
ScavengeImageCache.Initialize(this);
+1
View File
@@ -12,6 +12,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UIX.RenderApi.OpenGL\UIX.RenderApi.OpenGL.csproj" />
<ProjectReference Include="..\UIX.RenderApi\UIX.RenderApi.csproj" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />