diff --git a/.gitignore b/.gitignore
index b57860d5..803ea27f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ UnityProject/Logs
PluginSource/build
PluginSource/projects/Android/libs/*
PluginSource/projects/Android/obj/*
+PluginSource/source/*.o
diff --git a/PluginSource/projects/GNUMake/Makefile b/PluginSource/projects/GNUMake/Makefile
index bf23155d..ceb189bc 100644
--- a/PluginSource/projects/GNUMake/Makefile
+++ b/PluginSource/projects/GNUMake/Makefile
@@ -7,7 +7,7 @@ OBJS = ${SRCS:.cpp=.o}
UNITY_DEFINES = -DSUPPORT_OPENGL_UNIFIED=1 -DSUPPORT_VULKAN=1 -DUNITY_LINUX=1
CXXFLAGS = $(UNITY_DEFINES) -O2 -fPIC
LDFLAGS = -shared -rdynamic
-LIBS =
+LIBS = -lGL
PLUGIN_SHARED = libRenderingPlugin.so
CXX ?= g++
diff --git a/PluginSource/projects/QNX/Makefile b/PluginSource/projects/QNX/Makefile
new file mode 100644
index 00000000..0a0b112f
--- /dev/null
+++ b/PluginSource/projects/QNX/Makefile
@@ -0,0 +1,48 @@
+# UNITY_QNX_TARGET_LIB allows to specify the path to the QNX target libraries
+# e.g. for imx8qm, use "~/qnx710/target/qnx7/aarch64le/usr/lib/graphics/iMX8QM/"
+UNITY_QNX_TARGET_LIB ?= $(QNX_TARGET)/aarch64le/usr/lib
+
+# UNITY_QNX_GLES2_LIB allows to link against a device/driver-specific library
+# e.g. for imx8qm, use "GLESv2_viv"
+UNITY_QNX_GLES2_LIB ?= GLESv2
+
+SRCDIR = ../../source
+SRCS = $(SRCDIR)/RenderingPlugin.cpp \
+$(SRCDIR)/RenderAPI.cpp \
+$(SRCDIR)/RenderAPI_OpenGLCoreES.cpp
+OBJS = ${SRCS:.cpp=.o}
+UNITY_DEFINES = -DUNITY_QNX=1
+CXXFLAGS = $(UNITY_DEFINES) -O2 -fPIC
+LDFLAGS = -shared -rdynamic -static-libstdc++ -Wl,-soname,RenderingPlugin -Wl,-L$(UNITY_QNX_TARGET_LIB) -Wl,-l$(UNITY_QNX_GLES2_LIB)
+LIBS =
+PLUGIN_SHARED = libRenderingPlugin.so
+CXX = ntoaarch64-g++
+
+ifeq (, $(shell echo $(QNX_TARGET)))
+$(error "QNX_TARGET is not set.")
+endif
+
+ifeq (, $(shell echo $(QNX_HOST)))
+$(error "QNX_HOST is not set.")
+endif
+
+# Check if the CXX variable is set to a valid compiler
+ifeq (, $(shell which $(CXX)))
+$(error "No $(CXX) in PATH. Did you set '$$QNX_HOST/usr/bin' in your PATH?")
+endif
+
+.cpp.o:
+ $(CXX) $(CXXFLAGS) -c -o $@ $<
+
+all: clean shared
+
+cleanobjs:
+ rm -f $(OBJS)
+
+cleanlib:
+ rm -f $(PLUGIN_SHARED)
+
+clean: cleanobjs cleanlib
+
+shared: $(OBJS)
+ $(CXX) $(LDFLAGS) -o $(PLUGIN_SHARED) $(OBJS) $(LIBS)
diff --git a/PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.sln b/PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.sln
deleted file mode 100644
index 11fc4e6f..00000000
--- a/PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderingPlugin", "RenderingPlugin.vcxproj", "{6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|ARM = Debug|ARM
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|ARM = Release|ARM
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Debug|ARM.ActiveCfg = Debug|ARM
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Debug|ARM.Build.0 = Debug|ARM
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Debug|Win32.ActiveCfg = Debug|Win32
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Debug|Win32.Build.0 = Debug|Win32
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Debug|x64.ActiveCfg = Debug|x64
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Debug|x64.Build.0 = Debug|x64
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Release|ARM.ActiveCfg = Release|ARM
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Release|ARM.Build.0 = Release|ARM
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Release|Win32.ActiveCfg = Release|Win32
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Release|Win32.Build.0 = Release|Win32
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Release|x64.ActiveCfg = Release|x64
- {6C7AE7F4-BDCA-4E9A-81C8-75F5E138AA54}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.vcxproj b/PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.vcxproj
deleted file mode 100644
index fefa9331..00000000
--- a/PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.vcxproj
+++ /dev/null
@@ -1,367 +0,0 @@
-
-
-
-
- Debug
- ARM
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- ARM
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
-
-
-
-
- true
- true
- true
- true
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- true
- true
- true
- true
- true
-
-
-
-
- {6c7ae7f4-bdca-4e9a-81c8-75f5e138aa54}
- DynamicLibrary
- RenderingPlugin
- RenderingPlugin
- en-US
- 14.0
- true
- Windows Store
- 10.0.10586.0
- 10.0.10586.0
- 10.0
-
-
-
- DynamicLibrary
- true
-
-
- DynamicLibrary
- true
-
-
- DynamicLibrary
- true
-
-
- DynamicLibrary
- false
- true
-
-
- DynamicLibrary
- false
- true
-
-
- DynamicLibrary
- false
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
- false
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
-
-
- false
- false
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
-
-
- false
- false
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
-
-
- false
- false
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
-
-
- false
- false
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
-
-
- false
- false
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
- $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\$(MSBuildProjectName)\
-
-
-
- NotUsing
- false
- WINDOWS_UWP;UNITY_METRO;_WINDLL;%(PreprocessorDefinitions)
-
-
- Console
- false
- false
- ../../source/RenderingPlugin.def
-
-
- SETLOCAL
-
-if "$(SolutionName)" == "RenderingPlugin" (
- set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\
-) else (
- set TARGET_PLUGIN_PATH=$(SolutionDir)$(SolutionName)\
-)
-
-echo Target Plugin Path is %TARGET_PLUGIN_PATH%
-
-mkdir "%TARGET_PLUGIN_PATH%Plugins"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)"
-copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)\$(TargetFileName)"
-
-ENDLOCAL
-
-
-
-
-
- NotUsing
- false
- WINDOWS_UWP;UNITY_METRO;_WINDLL;%(PreprocessorDefinitions)
-
-
- Console
- false
- false
- ../../source/RenderingPlugin.def
-
-
- SETLOCAL
-
-if "$(SolutionName)" == "RenderingPlugin" (
- set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\
-) else (
- set TARGET_PLUGIN_PATH=$(SolutionDir)$(SolutionName)\
-)
-
-echo Target Plugin Path is %TARGET_PLUGIN_PATH%
-
-mkdir "%TARGET_PLUGIN_PATH%Plugins"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)"
-copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)\$(TargetFileName)"
-
-ENDLOCAL
-
-
-
-
-
- NotUsing
- false
- WINDOWS_UWP;UNITY_METRO;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)
-
-
- Console
- false
- false
- ../../source/RenderingPlugin.def
-
-
- SETLOCAL
-
-if "$(SolutionName)" == "RenderingPlugin" (
- set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\
-) else (
- set TARGET_PLUGIN_PATH=$(SolutionDir)$(SolutionName)\
-)
-
-echo Target Plugin Path is %TARGET_PLUGIN_PATH%
-
-mkdir "%TARGET_PLUGIN_PATH%Plugins"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)"
-copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)\$(TargetFileName)"
-
-ENDLOCAL
-
-
-
-
-
- NotUsing
- false
- WINDOWS_UWP;UNITY_METRO;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)
-
-
- Console
- false
- false
- ../../source/RenderingPlugin.def
-
-
- SETLOCAL
-
-if "$(SolutionName)" == "RenderingPlugin" (
- set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\
-) else (
- set TARGET_PLUGIN_PATH=$(SolutionDir)$(SolutionName)\
-)
-
-echo Target Plugin Path is %TARGET_PLUGIN_PATH%
-
-mkdir "%TARGET_PLUGIN_PATH%Plugins"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)"
-copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)\$(TargetFileName)"
-
-ENDLOCAL
-
-
-
-
-
- NotUsing
- false
- WINDOWS_UWP;UNITY_METRO;_WINDLL;%(PreprocessorDefinitions)
-
-
- Console
- false
- false
- ../../source/RenderingPlugin.def
-
-
- SETLOCAL
-
-if "$(SolutionName)" == "RenderingPlugin" (
- set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\
-) else (
- set TARGET_PLUGIN_PATH=$(SolutionDir)$(SolutionName)\
-)
-
-echo Target Plugin Path is %TARGET_PLUGIN_PATH%
-
-mkdir "%TARGET_PLUGIN_PATH%Plugins"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)"
-copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)\$(TargetFileName)"
-
-ENDLOCAL
-
-
-
-
-
- NotUsing
- false
- WINDOWS_UWP;UNITY_METRO;_WINDLL;%(PreprocessorDefinitions)
-
-
- Console
- false
- false
- ../../source/RenderingPlugin.def
-
-
- SETLOCAL
-
-if "$(SolutionName)" == "RenderingPlugin" (
- set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\
-) else (
- set TARGET_PLUGIN_PATH=$(SolutionDir)$(SolutionName)\
-)
-
-echo Target Plugin Path is %TARGET_PLUGIN_PATH%
-
-mkdir "%TARGET_PLUGIN_PATH%Plugins"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP"
-mkdir "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)"
-copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%Plugins\Metro\UWP\$(PlatformShortName)\$(TargetFileName)"
-
-ENDLOCAL
-
-
-
-
-
-
-
diff --git a/PluginSource/projects/VisualStudio2015/RenderingPlugin.sln b/PluginSource/projects/UWPVisualStudio2022/RenderingPlugin.sln
similarity index 100%
rename from PluginSource/projects/VisualStudio2015/RenderingPlugin.sln
rename to PluginSource/projects/UWPVisualStudio2022/RenderingPlugin.sln
diff --git a/PluginSource/projects/UWPVisualStudio2022/RenderingPlugin.vcxproj b/PluginSource/projects/UWPVisualStudio2022/RenderingPlugin.vcxproj
new file mode 100644
index 00000000..13036483
--- /dev/null
+++ b/PluginSource/projects/UWPVisualStudio2022/RenderingPlugin.vcxproj
@@ -0,0 +1,251 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(VULKAN_SDK)\Include
+ $(VULKAN_SDK)\Include
+
+
+
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}
+ RenderingPlugin
+ Win32Proj
+ 10.0
+
+
+
+ DynamicLibrary
+ v143
+ Unicode
+
+
+ DynamicLibrary
+ v143
+ Unicode
+
+
+ DynamicLibrary
+ v143
+ Unicode
+
+
+ DynamicLibrary
+ Unicode
+ v143
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>12.0.30501.0
+
+
+ $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\
+ $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\
+ $(IncludePath)
+
+
+ $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\
+ $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\
+ $(IncludePath)
+
+
+ $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\
+ $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\
+ $(IncludePath)
+
+
+ $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\
+ $(SolutionDir)..\..\build\uwp\$(Platform)\$(Configuration)\
+ $(IncludePath)
+
+
+
+ GLEW_STATIC;WIN32
+
+ Level3
+ stdcpp17
+ MultiThreadedDLL
+ true
+
+
+ opengl32.lib;d3d12.lib
+ true
+ Windows
+ ../../source/RenderingPlugin.def
+
+
+ SETLOCAL
+
+if "$(PlatformShortName)" == "x86" (
+ set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\Plugins\Metro\UWP\x86
+) else (
+ set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\Plugins\Metro\UWP\x64
+)
+echo Target Plugin Path is %TARGET_PLUGIN_PATH%
+copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%\$(TargetFileName)"
+
+ENDLOCAL
+
+
+
+
+
+ GLEW_STATIC;WIN32
+
+
+ Level3
+ stdcpp17
+ MultiThreadedDLL
+ true
+
+
+ opengl32.lib;d3d12.lib
+ true
+ Windows
+ ../../source/RenderingPlugin.def
+
+
+ SETLOCAL
+
+if "$(PlatformShortName)" == "x86" (
+ set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\Plugins\Metro\UWP\x86
+) else (
+ set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\Plugins\Metro\UWP\x64
+)
+echo Target Plugin Path is %TARGET_PLUGIN_PATH%
+copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%\$(TargetFileName)"
+
+ENDLOCAL
+
+
+
+
+
+ GLEW_STATIC;WIN32
+
+ Level3
+ stdcpp17
+ MultiThreadedDLL
+ true
+
+
+ opengl32.lib;d3d12.lib
+ true
+ Windows
+ ../../source/RenderingPlugin.def
+
+
+ SETLOCAL
+
+if "$(PlatformShortName)" == "x86" (
+ set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\Plugins\Metro\UWP\x86
+) else (
+ set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\Plugins\Metro\UWP\x64
+)
+echo Target Plugin Path is %TARGET_PLUGIN_PATH%
+copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%\$(TargetFileName)"
+
+ENDLOCAL
+
+
+
+
+
+ GLEW_STATIC;WIN32
+
+
+ Level3
+ stdcpp17
+ MultiThreadedDLL
+ true
+
+
+ opengl32.lib;d3d12.lib
+ true
+ Windows
+ ../../source/RenderingPlugin.def
+
+
+ SETLOCAL
+
+if "$(PlatformShortName)" == "x86" (
+ set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\Plugins\Metro\UWP\x86
+) else (
+ set TARGET_PLUGIN_PATH=$(SolutionDir)..\..\..\UnityProject\Assets\Plugins\Metro\UWP\x64
+)
+echo Target Plugin Path is %TARGET_PLUGIN_PATH%
+copy /Y "$(TargetPath)" "%TARGET_PLUGIN_PATH%\$(TargetFileName)"
+
+ENDLOCAL
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
\ No newline at end of file
diff --git a/PluginSource/projects/VisualStudio2015/RenderingPlugin.vcxproj.filters b/PluginSource/projects/UWPVisualStudio2022/RenderingPlugin.vcxproj.filters
similarity index 95%
rename from PluginSource/projects/VisualStudio2015/RenderingPlugin.vcxproj.filters
rename to PluginSource/projects/UWPVisualStudio2022/RenderingPlugin.vcxproj.filters
index 0de05ac9..1b8c3c5b 100644
--- a/PluginSource/projects/VisualStudio2015/RenderingPlugin.vcxproj.filters
+++ b/PluginSource/projects/UWPVisualStudio2022/RenderingPlugin.vcxproj.filters
@@ -49,6 +49,7 @@
+
diff --git a/PluginSource/projects/VisualStudio2022/RenderingPlugin.sln b/PluginSource/projects/VisualStudio2022/RenderingPlugin.sln
new file mode 100644
index 00000000..abf801d5
--- /dev/null
+++ b/PluginSource/projects/VisualStudio2022/RenderingPlugin.sln
@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40418.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderingPlugin", "RenderingPlugin.vcxproj", "{F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|Win32.Build.0 = Debug|Win32
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|x64.ActiveCfg = Debug|x64
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Debug|x64.Build.0 = Debug|x64
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|Win32.ActiveCfg = Release|Win32
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|Win32.Build.0 = Release|Win32
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|x64.ActiveCfg = Release|x64
+ {F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/PluginSource/projects/VisualStudio2015/RenderingPlugin.vcxproj b/PluginSource/projects/VisualStudio2022/RenderingPlugin.vcxproj
similarity index 73%
rename from PluginSource/projects/VisualStudio2015/RenderingPlugin.vcxproj
rename to PluginSource/projects/VisualStudio2022/RenderingPlugin.vcxproj
index fd6d842e..993ab16a 100644
--- a/PluginSource/projects/VisualStudio2015/RenderingPlugin.vcxproj
+++ b/PluginSource/projects/VisualStudio2022/RenderingPlugin.vcxproj
@@ -44,6 +44,7 @@
+
@@ -57,30 +58,28 @@
{F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}
RenderingPlugin
Win32Proj
- 10.0.16299.0
+ 10.0
DynamicLibrary
- v141
+ v143
Unicode
- true
DynamicLibrary
- v141
+ v143
Unicode
- true
DynamicLibrary
- v141
+ v143
Unicode
DynamicLibrary
- v141
Unicode
+ v143
@@ -104,40 +103,36 @@
$(SolutionDir)..\..\build\$(Platform)\$(Configuration)\
$(SolutionDir)..\..\build\$(Platform)\$(Configuration)\
- true
+ $(IncludePath)
- true
$(SolutionDir)..\..\build\$(Platform)\$(Configuration)\
$(SolutionDir)..\..\build\$(Platform)\$(Configuration)\
+ $(IncludePath)
$(SolutionDir)..\..\build\$(Platform)\$(Configuration)\
$(SolutionDir)..\..\build\$(Platform)\$(Configuration)\
- false
+ $(IncludePath)
- false
$(SolutionDir)..\..\build\$(Platform)\$(Configuration)\
$(SolutionDir)..\..\build\$(Platform)\$(Configuration)\
+ $(IncludePath)
- Disabled
- GLEW_STATIC;WIN32;_DEBUG;_WINDOWS;_USRDLL;RENDERINGPLUGIN_EXPORTS;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebug
+ GLEW_STATIC;WIN32
Level3
- EditAndContinue
- ../../
+ stdcpp17
+ MultiThreadedDLL
+ true
- opengl32.lib;%(AdditionalDependencies)
+ opengl32.lib;d3d12.lib
true
Windows
- MachineX86
../../source/RenderingPlugin.def
@@ -157,18 +152,16 @@ ENDLOCAL
- Disabled
- GLEW_STATIC;WIN32;_DEBUG;_WINDOWS;_USRDLL;RENDERINGPLUGIN_EXPORTS;%(PreprocessorDefinitions)
- EnableFastChecks
- MultiThreadedDebug
+ GLEW_STATIC;WIN32
Level3
- ProgramDatabase
- ../../
+ stdcpp17
+ MultiThreadedDLL
+ true
- opengl32.lib;%(AdditionalDependencies)
+ opengl32.lib;d3d12.lib
true
Windows
../../source/RenderingPlugin.def
@@ -190,23 +183,17 @@ ENDLOCAL
- MaxSpeed
- true
- GLEW_STATIC;WIN32;NDEBUG;_WINDOWS;_USRDLL;RENDERINGPLUGIN_EXPORTS;%(PreprocessorDefinitions)
- MultiThreaded
- true
+ GLEW_STATIC;WIN32
Level3
- ProgramDatabase
- ../../
+ stdcpp17
+ MultiThreadedDLL
+ true
- opengl32.lib;%(AdditionalDependencies)
+ opengl32.lib;d3d12.lib
true
Windows
- true
- true
- MachineX86
../../source/RenderingPlugin.def
@@ -226,23 +213,18 @@ ENDLOCAL
- MaxSpeed
- true
- GLEW_STATIC;WIN32;NDEBUG;_WINDOWS;_USRDLL;RENDERINGPLUGIN_EXPORTS;%(PreprocessorDefinitions)
- MultiThreaded
- true
+ GLEW_STATIC;WIN32
Level3
- ProgramDatabase
- ../../
+ stdcpp17
+ MultiThreadedDLL
+ true
- opengl32.lib;%(AdditionalDependencies)
+ opengl32.lib;d3d12.lib
true
Windows
- true
- true
../../source/RenderingPlugin.def
@@ -261,6 +243,9 @@ ENDLOCAL
-
-
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
\ No newline at end of file
diff --git a/PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.vcxproj.filters b/PluginSource/projects/VisualStudio2022/RenderingPlugin.vcxproj.filters
similarity index 64%
rename from PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.vcxproj.filters
rename to PluginSource/projects/VisualStudio2022/RenderingPlugin.vcxproj.filters
index 5cb27e52..1b8c3c5b 100644
--- a/PluginSource/projects/UWPVisualStudio2015/RenderingPlugin.vcxproj.filters
+++ b/PluginSource/projects/VisualStudio2022/RenderingPlugin.vcxproj.filters
@@ -1,18 +1,8 @@
-
-
-
- {0b7de993-622e-4614-b3bc-a6dd42480fbe}
-
-
-
-
-
-
-
-
-
+
+
+
Unity
@@ -31,11 +21,37 @@
Unity
-
-
+
+ gl3w
+
+
+ gl3w
+
+
+
+
+
+
+
+
+
+
+ gl3w
+
+
+
+
+ {c01468d4-90d4-4d19-9a9b-ee2f1b5e9083}
+
+
+ {f00ad923-e825-43a2-b22c-b3380a3a8813}
+
-
+
+
+
+
-
+
\ No newline at end of file
diff --git a/PluginSource/projects/Xcode/RenderingPlugin.xcodeproj/project.pbxproj b/PluginSource/projects/Xcode/RenderingPlugin.xcodeproj/project.pbxproj
index 08f683df..5c257d88 100644
--- a/PluginSource/projects/Xcode/RenderingPlugin.xcodeproj/project.pbxproj
+++ b/PluginSource/projects/Xcode/RenderingPlugin.xcodeproj/project.pbxproj
@@ -7,12 +7,11 @@
objects = {
/* Begin PBXBuildFile section */
- 2B6899B81CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B6899B01CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp */; };
2B6899B91CF8396700C4BA4F /* RenderAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B6899B11CF8396700C4BA4F /* RenderAPI.cpp */; };
2B6899BA1CF8396700C4BA4F /* RenderingPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B6899B31CF8396700C4BA4F /* RenderingPlugin.cpp */; };
2B6899C91CF83DB000C4BA4F /* RenderingPlugin.bundle in Copy Bundle into Unity project */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* RenderingPlugin.bundle */; };
2B6899CB1CF8409A00C4BA4F /* RenderAPI_Metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B6899CA1CF8409A00C4BA4F /* RenderAPI_Metal.mm */; };
- 2BC2A8D5144C433D00D5EF79 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */; };
+ 8A0E9E8B3022106C005CEB36 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A0E9E8A3022106C005CEB36 /* Metal.framework */; };
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; };
/* End PBXBuildFile section */
@@ -33,9 +32,6 @@
/* Begin PBXFileReference section */
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; };
2B6899AB1CF8396700C4BA4F /* PlatformBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformBase.h; path = ../../source/PlatformBase.h; sourceTree = ""; };
- 2B6899AD1CF8396700C4BA4F /* RenderAPI_D3D11.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderAPI_D3D11.cpp; path = ../../source/RenderAPI_D3D11.cpp; sourceTree = ""; };
- 2B6899AE1CF8396700C4BA4F /* RenderAPI_D3D12.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderAPI_D3D12.cpp; path = ../../source/RenderAPI_D3D12.cpp; sourceTree = ""; };
- 2B6899B01CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderAPI_OpenGLCoreES.cpp; path = ../../source/RenderAPI_OpenGLCoreES.cpp; sourceTree = ""; };
2B6899B11CF8396700C4BA4F /* RenderAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderAPI.cpp; path = ../../source/RenderAPI.cpp; sourceTree = ""; };
2B6899B21CF8396700C4BA4F /* RenderAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderAPI.h; path = ../../source/RenderAPI.h; sourceTree = ""; };
2B6899B31CF8396700C4BA4F /* RenderingPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderingPlugin.cpp; path = ../../source/RenderingPlugin.cpp; sourceTree = ""; };
@@ -46,7 +42,7 @@
2B6899C61CF839A600C4BA4F /* IUnityGraphicsMetal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IUnityGraphicsMetal.h; path = ../../source/Unity/IUnityGraphicsMetal.h; sourceTree = ""; };
2B6899C71CF839A600C4BA4F /* IUnityInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IUnityInterface.h; path = ../../source/Unity/IUnityInterface.h; sourceTree = ""; };
2B6899CA1CF8409A00C4BA4F /* RenderAPI_Metal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RenderAPI_Metal.mm; path = ../../source/RenderAPI_Metal.mm; sourceTree = ""; };
- 2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
+ 8A0E9E8A3022106C005CEB36 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
8D576316048677EA00EA77CD /* RenderingPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RenderingPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
/* End PBXFileReference section */
@@ -56,8 +52,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 8A0E9E8B3022106C005CEB36 /* Metal.framework in Frameworks */,
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */,
- 2BC2A8D5144C433D00D5EF79 /* OpenGL.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -71,6 +67,7 @@
089C167CFE841241C02AAC07 /* Resources */,
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
19C28FB6FE9D52B211CA2CBB /* Products */,
+ 8A0E9E893022106C005CEB36 /* Frameworks */,
);
name = RenderingPlugin;
sourceTree = "";
@@ -79,7 +76,6 @@
isa = PBXGroup;
children = (
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */,
- 2BC2A8D4144C433D00D5EF79 /* OpenGL.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "";
@@ -97,10 +93,7 @@
children = (
2B6899BC1CF8398200C4BA4F /* Unity */,
2B6899AB1CF8396700C4BA4F /* PlatformBase.h */,
- 2B6899AD1CF8396700C4BA4F /* RenderAPI_D3D11.cpp */,
- 2B6899AE1CF8396700C4BA4F /* RenderAPI_D3D12.cpp */,
2B6899CA1CF8409A00C4BA4F /* RenderAPI_Metal.mm */,
- 2B6899B01CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp */,
2B6899B11CF8396700C4BA4F /* RenderAPI.cpp */,
2B6899B21CF8396700C4BA4F /* RenderAPI.h */,
2B6899B31CF8396700C4BA4F /* RenderingPlugin.cpp */,
@@ -129,6 +122,14 @@
name = Unity;
sourceTree = "";
};
+ 8A0E9E893022106C005CEB36 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 8A0E9E8A3022106C005CEB36 /* Metal.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -194,7 +195,6 @@
buildActionMask = 2147483647;
files = (
2B6899BA1CF8396700C4BA4F /* RenderingPlugin.cpp in Sources */,
- 2B6899B81CF8396700C4BA4F /* RenderAPI_OpenGLCoreES.cpp in Sources */,
2B6899B91CF8396700C4BA4F /* RenderAPI.cpp in Sources */,
2B6899CB1CF8409A00C4BA4F /* RenderAPI_Metal.mm in Sources */,
);
@@ -214,9 +214,10 @@
HEADER_SEARCH_PATHS = ../;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
+ MACOSX_DEPLOYMENT_TARGET = 12.0;
+ ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034Identifier}";
PRODUCT_NAME = RenderingPlugin;
- VALID_ARCHS = x86_64;
WRAPPER_EXTENSION = bundle;
};
name = Debug;
@@ -231,9 +232,10 @@
HEADER_SEARCH_PATHS = ../;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
+ MACOSX_DEPLOYMENT_TARGET = 12.0;
+ ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:rfc1034Identifier}";
PRODUCT_NAME = RenderingPlugin;
- VALID_ARCHS = x86_64;
WRAPPER_EXTENSION = bundle;
};
name = Release;
@@ -244,8 +246,8 @@
ARCHS = "$(ARCHS_STANDARD)";
ENABLE_TESTABILITY = YES;
GCC_OPTIMIZATION_LEVEL = 0;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- ONLY_ACTIVE_ARCH = YES;
+ MACOSX_DEPLOYMENT_TARGET = 12.0;
+ ONLY_ACTIVE_ARCH = NO;
SDKROOT = macosx;
SYMROOT = ../../build;
};
@@ -255,9 +257,10 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
- MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MACOSX_DEPLOYMENT_TARGET = 12.0;
SDKROOT = macosx;
SYMROOT = ../../build;
+ ONLY_ACTIVE_ARCH = NO;
};
name = Release;
};
diff --git a/PluginSource/source/PlatformBase.h b/PluginSource/source/PlatformBase.h
index 9482d3fd..c9d4e8b3 100644
--- a/PluginSource/source/PlatformBase.h
+++ b/PluginSource/source/PlatformBase.h
@@ -28,7 +28,7 @@
#endif
#elif defined(__ANDROID__)
#define UNITY_ANDROID 1
-#elif defined(UNITY_METRO) || defined(UNITY_LINUX) || defined(UNITY_WEBGL) || defined (UNITY_EMBEDDED_LINUX) || defined (UNITY_EMBEDDED_LINUX_GL)
+#elif defined(UNITY_METRO) || defined(UNITY_LINUX) || defined(UNITY_WEBGL) || defined (UNITY_EMBEDDED_LINUX) || defined (UNITY_EMBEDDED_LINUX_GL) || defined (UNITY_QNX)
// these are defined externally
#elif defined(__EMSCRIPTEN__)
// this is already defined in Unity 5.6
@@ -47,11 +47,11 @@
#endif
#elif UNITY_WIN
#define SUPPORT_D3D11 1 // comment this out if you don't have D3D11 header/library files
- #define SUPPORT_D3D12 1 // comment this out if you don't have D3D12 header/library files
+ #define SUPPORT_D3D12 0 // comment this out if you don't have D3D12 header/library files
#define SUPPORT_OPENGL_UNIFIED 1
#define SUPPORT_OPENGL_CORE 1
#define SUPPORT_VULKAN 0 // Requires Vulkan SDK to be installed
-#elif UNITY_IOS || UNITY_TVOS || UNITY_ANDROID || UNITY_WEBGL
+#elif UNITY_ANDROID || UNITY_WEBGL
#ifndef SUPPORT_OPENGL_ES
#define SUPPORT_OPENGL_ES 1
#endif
@@ -59,7 +59,7 @@
#ifndef SUPPORT_VULKAN
#define SUPPORT_VULKAN 0
#endif
-#elif UNITY_OSX || UNITY_LINUX
+#elif UNITY_LINUX
#define SUPPORT_OPENGL_UNIFIED 1
#define SUPPORT_OPENGL_CORE 1
#elif UNITY_EMBEDDED_LINUX
@@ -68,6 +68,9 @@
#ifndef SUPPORT_VULKAN
#define SUPPORT_VULKAN 0
#endif
+#elif UNITY_QNX
+ #define SUPPORT_OPENGL_UNIFIED 1
+ #define SUPPORT_OPENGL_ES 1
#endif
#if UNITY_IOS || UNITY_TVOS || UNITY_OSX
diff --git a/PluginSource/source/RenderAPI.cpp b/PluginSource/source/RenderAPI.cpp
index 238b397f..6b18cede 100644
--- a/PluginSource/source/RenderAPI.cpp
+++ b/PluginSource/source/RenderAPI.cpp
@@ -2,7 +2,6 @@
#include "PlatformBase.h"
#include "Unity/IUnityGraphics.h"
-
RenderAPI* CreateRenderAPI(UnityGfxRenderer apiType)
{
# if SUPPORT_D3D11
@@ -23,7 +22,7 @@ RenderAPI* CreateRenderAPI(UnityGfxRenderer apiType)
# if SUPPORT_OPENGL_UNIFIED
- if (apiType == kUnityGfxRendererOpenGLCore || apiType == kUnityGfxRendererOpenGLES20 || apiType == kUnityGfxRendererOpenGLES30)
+ if (apiType == kUnityGfxRendererOpenGLCore || apiType == kUnityGfxRendererOpenGLES30)
{
extern RenderAPI* CreateRenderAPI_OpenGLCoreES(UnityGfxRenderer apiType);
return CreateRenderAPI_OpenGLCoreES(apiType);
diff --git a/PluginSource/source/RenderAPI.h b/PluginSource/source/RenderAPI.h
index b2387844..f2935ff8 100644
--- a/PluginSource/source/RenderAPI.h
+++ b/PluginSource/source/RenderAPI.h
@@ -6,7 +6,6 @@
struct IUnityInterfaces;
-
// Super-simple "graphics abstraction". This is nothing like how a proper platform abstraction layer would look like;
// all this does is a base interface for whatever our plugin sample needs. Which is only "draw some triangles"
// and "modify a texture" at this point.
@@ -47,6 +46,41 @@ class RenderAPI
virtual void* BeginModifyVertexBuffer(void* bufferHandle, size_t* outBufferSize) = 0;
// End modifying vertex buffer data.
virtual void EndModifyVertexBuffer(void* bufferHandle) = 0;
+
+ // --------------------------------------------------------------------------
+ // DX12 plugin specific functions
+ // --------------------------------------------------------------------------
+
+ // Draws to a texture that is created by the plugin
+ virtual void drawToPluginTexture() {}
+
+ // Draws to a a unity RenderBuffer which can be set with
+ // setRenderTextureResource(). When the texture resource is not
+ // set with setRenderTextureResource() one is created by the plugin
+ virtual void drawToRenderTexture() {}
+
+ // Returns the native resource pointer to either unity render buffer or
+ // to the resource created by the plugin (i.e ID3D12Resource* in case of DX12)
+ virtual void* getRenderTexture() { return nullptr; }
+
+ // Sets the underlying resource to unity RenderBuffer
+ // see https://docs.unity3d.com/ScriptReference/RenderBuffer.html
+ // setting rb to nullptr is used to signal the plugin that the
+ // previously set RenderBuffer is no longer valid
+ virtual void setRenderTextureResource(UnityRenderBuffer rb) {}
+
+ // This should return true when the plugin is used with the unity player
+ // and false when the editor is used. The editor uses multiple swap
+ // chains (for each window) so instead of choosing one of them nullptr is returned.
+ virtual bool isSwapChainAvailable() { return false; };
+
+ // These require the swap chain to be available to be functional.
+ // When the swap chain is not available these simply return 0
+
+ virtual unsigned int getPresentFlags() { return 0; }
+ virtual unsigned int getSyncInterval() { return 0; }
+ virtual unsigned int getBackbufferWidth() { return 0; }
+ virtual unsigned int getBackbufferHeight() { return 0; }
};
diff --git a/PluginSource/source/RenderAPI_D3D12.cpp b/PluginSource/source/RenderAPI_D3D12.cpp
index aabc3273..135b6516 100644
--- a/PluginSource/source/RenderAPI_D3D12.cpp
+++ b/PluginSource/source/RenderAPI_D3D12.cpp
@@ -5,268 +5,1666 @@
// Direct3D 12 implementation of RenderAPI.
-
#if SUPPORT_D3D12
#include
+#include
+#include
#include
+#include "d3dx12.h"
#include "Unity/IUnityGraphicsD3D12.h"
+#include
+#include
+#include
+#include