From 70488be450eb9eb6a4b4edfcee6cef6f60595936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 17 Oct 2022 18:39:02 +0200 Subject: [PATCH] Make as much as possible of the VR code build on all platforms --- CMakeLists.txt | 29 +++++------ Common/Common.vcxproj | 95 ++++++----------------------------- Common/Common.vcxproj.filters | 8 +-- Common/VR/PPSSPPVR.cpp | 6 +++ Common/VR/VRBase.cpp | 7 ++- Common/VR/VRBase.h | 32 +++++++++++- Common/VR/VRFramebuffer.cpp | 33 +++++++++--- Common/VR/VRFramebuffer.h | 2 +- Common/VR/VRInput.cpp | 23 +++------ Common/VR/VRMath.cpp | 5 ++ Common/VR/VRRenderer.cpp | 12 +++-- android/jni/Android.mk | 9 ++++ libretro/Makefile.common | 8 +++ 13 files changed, 136 insertions(+), 133 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0577780a6..b8b323d4ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1092,21 +1092,22 @@ if(ANDROID) android/jni/OpenSLContext.h ) + set(nativeExtra ${nativeExtra} + Common/VR/PPSSPPVR.cpp + Common/VR/PPSSPPVR.h + Common/VR/VRBase.cpp + Common/VR/VRBase.h + Common/VR/VRFramebuffer.cpp + Common/VR/VRFramebuffer.h + Common/VR/VRInput.cpp + Common/VR/VRInput.h + Common/VR/VRMath.cpp + Common/VR/VRMath.h + Common/VR/VRRenderer.cpp + Common/VR/VRRenderer.h + ) + if (OPENXR) - set(nativeExtra ${nativeExtra} - Common/VR/PPSSPPVR.cpp - Common/VR/PPSSPPVR.h - Common/VR/VRBase.cpp - Common/VR/VRBase.h - Common/VR/VRFramebuffer.cpp - Common/VR/VRFramebuffer.h - Common/VR/VRInput.cpp - Common/VR/VRInput.h - Common/VR/VRMath.cpp - Common/VR/VRMath.h - Common/VR/VRRenderer.cpp - Common/VR/VRRenderer.h - ) set(nativeExtraLibs ${nativeExtraLibs} openxr) endif() # No target diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index e5e6a5530a..5c085bd0ed 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -136,7 +136,7 @@ _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) Common/DbgNew.h MultiThreadedDebug - ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib + ../ext/openxr;../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib StreamingSIMDExtensions2 Precise true @@ -162,7 +162,7 @@ Common/DbgNew.h MultiThreadedDebug _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib + ../ext/openxr;../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib NotSet Precise false @@ -189,7 +189,7 @@ Common/DbgNew.h MultiThreadedDebug _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib + ../ext/openxr;../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib NotSet Precise false @@ -217,7 +217,7 @@ MultiThreadedDebug _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib + ../ext/openxr;../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib NotSet Precise false @@ -250,7 +250,7 @@ false StreamingSIMDExtensions2 Precise - ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib + ../ext/openxr;../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib Speed true false @@ -280,7 +280,7 @@ USING_WIN_UI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib + ../ext/openxr;../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib false NotSet Precise @@ -315,7 +315,7 @@ USING_WIN_UI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib + ../ext/openxr;../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib false NotSet Precise @@ -350,7 +350,7 @@ USING_WIN_UI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib + ../ext/openxr;../ext/glew;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..;../ext/zstd/lib false NotSet Precise @@ -563,7 +563,6 @@ - @@ -996,76 +995,12 @@ - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - + + + + + + @@ -1080,4 +1015,4 @@ - \ No newline at end of file + diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index e04ecff0c8..5c58a6453f 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -443,9 +443,6 @@ VR - - VR - @@ -842,9 +839,6 @@ VR - - VR - @@ -958,4 +952,4 @@ ext\libpng17 - \ No newline at end of file + diff --git a/Common/VR/PPSSPPVR.cpp b/Common/VR/PPSSPPVR.cpp index a0807b049a..abbd78cfdf 100644 --- a/Common/VR/PPSSPPVR.cpp +++ b/Common/VR/PPSSPPVR.cpp @@ -12,6 +12,8 @@ #include "Core/KeyMap.h" #include "Core/System.h" +#ifdef OPENXR + static long vrCompat[VR_COMPAT_MAX]; /* @@ -99,6 +101,7 @@ bool IsVRBuild() { return true; } +#if PPSSPP_PLATFORM(ANDROID) void InitVROnAndroid(void* vm, void* activity, int version, const char* name) { bool useVulkan = (GPUBackend)g_Config.iGPUBackend == GPUBackend::VULKAN; @@ -111,6 +114,7 @@ void InitVROnAndroid(void* vm, void* activity, int version, const char* name) { __DisplaySetFramerate(72); } +#endif void EnterVR(bool firstStart, void* vulkanContext) { if (firstStart) { @@ -456,3 +460,5 @@ void UpdateVRView(float* leftEye, float* rightEye) { memcpy(dst[index], renderView.M, 16 * sizeof(float)); } } + +#endif diff --git a/Common/VR/VRBase.cpp b/Common/VR/VRBase.cpp index abbad01d78..687506aeb5 100644 --- a/Common/VR/VRBase.cpp +++ b/Common/VR/VRBase.cpp @@ -3,9 +3,12 @@ #include #include #include -#include #include +#if PPSSPP_PLATFORM(ANDROID) + +#include + #ifdef OPENXR_PLATFORM_PICO enum ConfigsSetEXT { UNREAL_VERSION = 0, @@ -248,3 +251,5 @@ void VR_LeaveVR( engine_t* engine ) { engine_t* VR_GetEngine( void ) { return &vr_engine; } + +#endif diff --git a/Common/VR/VRBase.h b/Common/VR/VRBase.h index 5f9016d7cd..4caa9417ba 100644 --- a/Common/VR/VRBase.h +++ b/Common/VR/VRBase.h @@ -1,10 +1,14 @@ #pragma once -#ifdef ANDROID +#include "ppsspp_config.h" + +// TODO: Switch to PPSSPP logging +#if PPSSPP_PLATFORM(ANDROID) #include #define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, "OpenXR", __VA_ARGS__); #define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, "OpenXR", __VA_ARGS__); #else +#include #define ALOGE(...) printf(__VA_ARGS__) #define ALOGV(...) printf(__VA_ARGS__) #endif @@ -17,6 +21,7 @@ using namespace PPSSPP_VK; #endif +#if PPSSPP_PLATFORM(ANDROID) //OpenXR #define XR_USE_PLATFORM_ANDROID 1 #define XR_USE_GRAPHICS_API_OPENGL_ES 1 @@ -24,13 +29,29 @@ using namespace PPSSPP_VK; #include #include #include +#elif PPSSPP_PLATFORM(WINDOWS) +#include "Common/CommonWindows.h" +#include +#define XR_USE_PLATFORM_WIN32 1 +#define XR_USE_GRAPHICS_API_OPENGL_ES 1 +#define XR_USE_GRAPHICS_API_VULKAN 1 +#else +#define XR_USE_GRAPHICS_API_OPENGL_ES 1 +#define XR_USE_GRAPHICS_API_VULKAN 1 +#endif + #include #include #include + +#if PPSSPP_PLATFORM(ANDROID) + #include #include -#ifdef _DEBUG +#endif + +#if defined(_DEBUG) && PPSSPP_PLATFORM(ANDROID) static const char* GlErrorString(GLenum error) { switch (error) { case GL_NO_ERROR: @@ -148,6 +169,7 @@ typedef struct { ovrRenderer Renderer; } ovrApp; +#if PPSSPP_PLATFORM(ANDROID) typedef struct { JavaVM* Vm; jobject ActivityObject; @@ -155,17 +177,23 @@ typedef struct { char AppName[64]; int AppVersion; } ovrJava; +#endif typedef struct { uint64_t frameIndex; ovrApp appState; +#if PPSSPP_PLATFORM(ANDROID) ovrJava java; +#endif float predictedDisplayTime; bool useVulkan; XrGraphicsBindingVulkanKHR graphicsBindingVulkan; } engine_t; +#if PPSSPP_PLATFORM(ANDROID) void VR_Init( ovrJava java, bool useVulkan ); +#endif + void VR_Destroy( engine_t* engine ); void VR_EnterVR( engine_t* engine, XrGraphicsBindingVulkanKHR* graphicsBindingVulkan ); void VR_LeaveVR( engine_t* engine ); diff --git a/Common/VR/VRFramebuffer.cpp b/Common/VR/VRFramebuffer.cpp index 742e9457c6..8e7828ded8 100644 --- a/Common/VR/VRFramebuffer.cpp +++ b/Common/VR/VRFramebuffer.cpp @@ -1,14 +1,17 @@ #include "VRFramebuffer.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include + +#if PPSSPP_PLATFORM(ANDROID) #include #include -#include +#endif double FromXrTime(const XrTime time) { return (time * 1e-9); @@ -41,6 +44,8 @@ void ovrFramebuffer_Clear(ovrFramebuffer* frameBuffer) { frameBuffer->Acquired = false; } +#if PPSSPP_PLATFORM(ANDROID) + bool ovrFramebuffer_CreateGL(XrSession session, ovrFramebuffer* frameBuffer, int width, int height, bool multiview) { frameBuffer->Width = width; @@ -133,6 +138,8 @@ bool ovrFramebuffer_CreateGL(XrSession session, ovrFramebuffer* frameBuffer, int return true; } +#endif + bool ovrFramebuffer_CreateVK(XrSession session, ovrFramebuffer* frameBuffer, int width, int height, bool multiview, void* context) { @@ -248,8 +255,10 @@ void ovrFramebuffer_Destroy(ovrFramebuffer* frameBuffer) { delete[] frameBuffer->VKDepthImages; delete[] frameBuffer->VKFrameBuffers; } else { +#if PPSSPP_PLATFORM(ANDROID) GL(glDeleteFramebuffers(frameBuffer->TextureSwapChainLength, frameBuffer->GLFrameBuffers)); free(frameBuffer->GLFrameBuffers); +#endif } OXR(xrDestroySwapchain(frameBuffer->ColorSwapChain.Handle)); OXR(xrDestroySwapchain(frameBuffer->DepthSwapChain.Handle)); @@ -263,7 +272,9 @@ void* ovrFramebuffer_SetCurrent(ovrFramebuffer* frameBuffer) { if (frameBuffer->UseVulkan) { return frameBuffer->VKFrameBuffers[frameBuffer->TextureSwapChainIndex]; } else { +#if PPSSPP_PLATFORM(ANDROID) GL(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBuffer->GLFrameBuffers[frameBuffer->TextureSwapChainIndex])); +#endif return nullptr; } } @@ -293,6 +304,7 @@ void ovrFramebuffer_Acquire(ovrFramebuffer* frameBuffer) { if (frameBuffer->UseVulkan) { //TODO:implement } else { +#if PPSSPP_PLATFORM(ANDROID) GL(glEnable( GL_SCISSOR_TEST )); GL(glViewport( 0, 0, frameBuffer->Width, frameBuffer->Height )); GL(glClearColor( 0.0f, 0.0f, 0.0f, 1.0f )); @@ -300,6 +312,7 @@ void ovrFramebuffer_Acquire(ovrFramebuffer* frameBuffer) { GL(glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT )); GL(glScissor( 0, 0, 0, 0 )); GL(glDisable( GL_SCISSOR_TEST )); +#endif } } @@ -313,10 +326,12 @@ void ovrFramebuffer_Release(ovrFramebuffer* frameBuffer) { if (frameBuffer->UseVulkan) { //TODO:implement } else { +#if PPSSPP_PLATFORM(ANDROID) GL(glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE)); GL(glClearColor(0.0f, 0.0f, 0.0f, 1.0f)); GL(glClear(GL_COLOR_BUFFER_BIT)); GL(glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE)); +#endif } } } @@ -342,7 +357,9 @@ void ovrRenderer_Create(XrSession session, ovrRenderer* renderer, int width, int if (vulkanContext) { ovrFramebuffer_CreateVK(session, &renderer->FrameBuffer[i], width, height, multiview, vulkanContext); } else { +#if PPSSPP_PLATFORM(ANDROID) ovrFramebuffer_CreateGL(session, &renderer->FrameBuffer[i], width, height, multiview); +#endif } } } @@ -358,12 +375,14 @@ void ovrRenderer_MouseCursor(ovrRenderer* renderer, int x, int y, int size) { if (renderer->FrameBuffer[0].UseVulkan) { //TODO:implement } else { +#if PPSSPP_PLATFORM(ANDROID) GL(glEnable(GL_SCISSOR_TEST)); GL(glScissor(x, y, size, size)); GL(glViewport(x, y, size, size)); GL(glClearColor(1.0f, 1.0f, 1.0f, 1.0f)); GL(glClear(GL_COLOR_BUFFER_BIT)); GL(glDisable(GL_SCISSOR_TEST)); +#endif } } diff --git a/Common/VR/VRFramebuffer.h b/Common/VR/VRFramebuffer.h index 644a28fe4c..5dd455fd16 100644 --- a/Common/VR/VRFramebuffer.h +++ b/Common/VR/VRFramebuffer.h @@ -1,6 +1,6 @@ #pragma once -#include "VR/VRBase.h" +#include "Common/VR/VRBase.h" void ovrApp_Clear(ovrApp* app); void ovrApp_Destroy(ovrApp* app); diff --git a/Common/VR/VRInput.cpp b/Common/VR/VRInput.cpp index 2fc8816f61..e07c44fcda 100644 --- a/Common/VR/VRInput.cpp +++ b/Common/VR/VRInput.cpp @@ -1,6 +1,7 @@ #include "VRInput.h" #include -#include + +#include //OpenXR XrPath leftHandPath; @@ -41,20 +42,11 @@ float vibration_channel_intensity[2] = {0.0f, 0.0f}; unsigned long sys_timeBase = 0; int milliseconds(void) { - struct timeval tp; - - gettimeofday(&tp, NULL); - - if (!sys_timeBase) { - sys_timeBase = tp.tv_sec; - return tp.tv_usec/1000; - } - - return (tp.tv_sec - sys_timeBase)*1000 + tp.tv_usec/1000; + return (int)(1000.0 * time_now_d()); } XrTime ToXrTime(const double timeInSeconds) { - return (timeInSeconds * 1e9); + return (XrTime)(timeInSeconds * 1e9); } void INVR_Vibrate( int duration, int chan, float intensity ) { @@ -67,16 +59,15 @@ void INVR_Vibrate( int duration, int chan, float intensity ) { if (vibration_channel_duration[channel] == -1.0f && duration != 0.0f) return; - vibration_channel_duration[channel] = duration; + vibration_channel_duration[channel] = (float)duration; vibration_channel_intensity[channel] = intensity; } } } - void VR_processHaptics() { float lastFrameTime = 0.0f; - float timestamp = (float)(milliseconds( )); + float timestamp = (float)(milliseconds()); float frametime = timestamp - lastFrameTime; lastFrameTime = timestamp; @@ -438,6 +429,6 @@ XrPosef IN_VRGetPose( int controllerIndex ) { XrSpaceLocation loc = {}; loc.type = XR_TYPE_SPACE_LOCATION; XrSpace aimSpace[] = { leftControllerAimSpace, rightControllerAimSpace }; - xrLocateSpace(aimSpace[controllerIndex], engine->appState.CurrentSpace, engine->predictedDisplayTime, &loc); + xrLocateSpace(aimSpace[controllerIndex], engine->appState.CurrentSpace, (XrTime)(engine->predictedDisplayTime), &loc); return loc.pose; } diff --git a/Common/VR/VRMath.cpp b/Common/VR/VRMath.cpp index 204e591fad..df9512d186 100644 --- a/Common/VR/VRMath.cpp +++ b/Common/VR/VRMath.cpp @@ -1,5 +1,10 @@ +#include + #include "VRMath.h" +#include "Common/Math/math_util.h" + + float ToDegrees(float rad) { return (float)(rad / M_PI * 180.0f); } diff --git a/Common/VR/VRRenderer.cpp b/Common/VR/VRRenderer.cpp index 64c388df07..08f44749e4 100644 --- a/Common/VR/VRRenderer.cpp +++ b/Common/VR/VRRenderer.cpp @@ -2,9 +2,11 @@ #include "VRInput.h" #include "VRRenderer.h" -#include -#include -#include +#include "Common/Math/math_util.h" + +#include +#include +#include XrFovf fov; XrView* projections; @@ -301,8 +303,8 @@ bool VR_InitFrame( engine_t* engine ) { // Update matrices for (int matrix = 0; matrix < VR_MATRIX_COUNT; matrix++) { if ((matrix == VR_PROJECTION_MATRIX_LEFT_EYE) || (matrix == VR_PROJECTION_MATRIX_RIGHT_EYE)) { - float near = (float)vrConfig[VR_CONFIG_FOV_SCALE] / 200.0f; - vrMatrix[matrix] = ovrMatrix4f_CreateProjectionFov(fov.angleLeft, fov.angleRight, fov.angleUp, fov.angleDown, near, 0.0f ); + float nearPlane = (float)vrConfig[VR_CONFIG_FOV_SCALE] / 200.0f; + vrMatrix[matrix] = ovrMatrix4f_CreateProjectionFov(fov.angleLeft, fov.angleRight, fov.angleUp, fov.angleDown, nearPlane, 0.0f ); } else if ((matrix == VR_VIEW_MATRIX_LEFT_EYE) || (matrix == VR_VIEW_MATRIX_RIGHT_EYE)) { XrPosef invView = invViewTransform[0]; diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 305caf67a5..333733382e 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -71,6 +71,14 @@ SPIRV_CROSS_FILES := \ $(SRC)/ext/SPIRV-Cross/spirv_parser.cpp \ $(SRC)/ext/SPIRV-Cross/spirv_cross_parsed_ir.cpp +VR_FILES := \ + $(SRC)/Common/VR/PPSSPPVR.cpp \ + $(SRC)/Common/VR/VRBase.cpp \ + $(SRC)/Common/VR/VRFramebuffer.cpp \ + $(SRC)/Common/VR/VRInput.cpp \ + $(SRC)/Common/VR/VRMath.cpp \ + $(SRC)/Common/VR/VRRenderer.cpp + EXT_FILES := \ $(SRC)/ext/cityhash/city.cpp \ $(SRC)/ext/libpng17/png.c \ @@ -115,6 +123,7 @@ EXEC_AND_LIB_FILES := \ $(ARCH_FILES) \ $(EGL_FILES) \ $(VULKAN_FILES) \ + $(VR_FILES) \ $(VMA_FILES) \ $(SPIRV_CROSS_FILES) \ $(EXT_FILES) \ diff --git a/libretro/Makefile.common b/libretro/Makefile.common index 375792b296..014579eec4 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -314,6 +314,14 @@ SOURCES_CXX += \ $(COMMONDIR)/StringUtils.cpp \ $(COMMONDIR)/TimeUtil.cpp +SOURCES_CXX += \ + $(COMMONDIR)/VRBase.cpp \ + $(COMMONDIR)/VRMath.cpp \ + $(COMMONDIR)/VRFramebuffer.cpp \ + $(COMMONDIR)/VRInput.cpp \ + $(COMMONDIR)/VRMath.cpp \ + $(COMMONDIR)/VRRenderer.cpp + SOURCES_C +=\ $(COMMONDIR)/GPU/OpenGL/gl3stub.c \ $(COMMONDIR)/Math/fast/fast_matrix.c