]> git.lizzy.rs Git - irrlicht.git/commitdiff
Restore isDriverSupported, but in a cpp file
authornumzero <numzer0@yandex.ru>
Mon, 6 Mar 2023 11:10:05 +0000 (14:10 +0300)
committernumzero <numzer0@yandex.ru>
Mon, 6 Mar 2023 11:22:48 +0000 (14:22 +0300)
include/IrrlichtDevice.h
source/Irrlicht/Irrlicht.cpp

index 07d4f9f823839a2e1a9ea3374064b21c5d350159..c6a19787859ee69ad3342effaba9348c5f0d751f 100644 (file)
@@ -14,6 +14,7 @@
 #include "ICursorControl.h"\r
 #include "ITimer.h"\r
 #include "IOSOperator.h"\r
+#include "IrrCompileConfig.h"\r
 \r
 namespace irr\r
 {\r
@@ -34,6 +35,7 @@ namespace irr
 \r
        namespace video {\r
                class IContextManager;\r
+               extern "C" IRRLICHT_API bool IRRCALLCONV isDriverSupported(E_DRIVER_TYPE driver);\r
        } // end namespace video\r
 \r
        //! The Irrlicht device. You can create it with createDevice() or createDeviceEx().\r
@@ -310,7 +312,7 @@ namespace irr
                for a configuration requested when creating the device. */\r
                static bool isDriverSupported(video::E_DRIVER_TYPE driver)\r
                {\r
-                       return true;\r
+                       return video::isDriverSupported(driver);\r
                }\r
        };\r
 \r
index 826414fb468b043f9ca9aa3cbbbf30f05a2836ce..50348e7f403d772796351d1dcaf6c5a5d9ecad53 100644 (file)
@@ -113,6 +113,26 @@ namespace core
 namespace video\r
 {\r
        SMaterial IdentityMaterial;\r
+\r
+       extern "C" IRRLICHT_API bool IRRCALLCONV isDriverSupported(E_DRIVER_TYPE driver)\r
+       {\r
+               switch (driver) {\r
+                       case EDT_NULL: return true;\r
+#ifdef _IRR_COMPILE_WITH_OPENGL_\r
+                       case EDT_OPENGL: return true;\r
+#endif\r
+#ifdef _IRR_COMPILE_WITH_OGLES1_\r
+                       case EDT_OGLES1: return true;\r
+#endif\r
+#ifdef _IRR_COMPILE_WITH_OGLES2_\r
+                       case EDT_OGLES2: return true;\r
+#endif\r
+#ifdef _IRR_COMPILE_WITH_WEBGL1_\r
+                       case EDT_WEBGL1: return true;\r
+#endif\r
+                       default: return false;\r
+               }\r
+       }\r
 }\r
 \r
 } // end namespace irr\r