OpenGLRenderer: Try to load OpenGL on desktop instead of OpenGL ES

This commit is contained in:
Lynix
2021-10-30 00:51:17 +02:00
parent b2aedd394c
commit 90c738023a
3 changed files with 33 additions and 7 deletions

View File

@@ -28,8 +28,8 @@ namespace Nz
OpenGLDevice(OpenGLDevice&&) = delete; ///TODO?
~OpenGLDevice();
std::unique_ptr<GL::Context> CreateContext(const GL::ContextParams& params) const;
std::unique_ptr<GL::Context> CreateContext(const GL::ContextParams& params, WindowHandle handle) const;
std::unique_ptr<GL::Context> CreateContext(GL::ContextParams params) const;
std::unique_ptr<GL::Context> CreateContext(GL::ContextParams params, WindowHandle handle) const;
const RenderDeviceInfo& GetDeviceInfo() const override;
const RenderDeviceFeatures& GetEnabledFeatures() const override;

View File

@@ -91,6 +91,7 @@
// Try to identify target platform via defines
#if defined(_WIN32)
#define NAZARA_PLATFORM_DESKTOP
#define NAZARA_PLATFORM_WINDOWS
#define NAZARA_EXPORT __declspec(dllexport)
@@ -123,14 +124,16 @@
#endif
#endif
#elif defined(__linux__) || defined(__unix__)
#define NAZARA_PLATFORM_DESKTOP
#define NAZARA_PLATFORM_LINUX
#define NAZARA_PLATFORM_POSIX
#define NAZARA_EXPORT __attribute__((visibility ("default")))
#define NAZARA_IMPORT __attribute__((visibility ("default")))
#elif defined(__APPLE__) && defined(__MACH__)
#define NAZARA_PLATFORM_MACOSX
#define NAZARA_PLATFORM_POSIX
#define NAZARA_PLATFORM_DESKTOP
#define NAZARA_PLATFORM_MACOSX
#define NAZARA_PLATFORM_POSIX
#define NAZARA_EXPORT __attribute__((visibility ("default")))
#define NAZARA_IMPORT __attribute__((visibility ("default")))