// Copyright (C) 2020 Jérôme Leclercq // This file is part of the "Nazara Engine - OpenGL Renderer" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_OPENGLRENDERER_EGLLOADER_HPP #define NAZARA_OPENGLRENDERER_EGLLOADER_HPP #include #include #include #include #include namespace Nz::GL { class NAZARA_OPENGLRENDERER_API EGLLoader : public Loader { struct SymbolLoader; friend SymbolLoader; public: EGLLoader(); ~EGLLoader(); std::unique_ptr CreateContext(const OpenGLDevice* device, const ContextParams& params, Context* shareContext) const override; std::unique_ptr CreateContext(const OpenGLDevice* device, const ContextParams& params, WindowHandle handle, Context* shareContext) const override; inline EGLDisplay GetDefaultDisplay() const; GLFunction LoadFunction(const char* name) const override; #define NAZARA_OPENGLRENDERER_EGL_FUNC(name, sig) sig name = nullptr; #define NAZARA_OPENGLRENDERER_EGL_FUNC_OPT(name, sig) NAZARA_OPENGLRENDERER_EGL_FUNC(name, sig) #include static const char* TranslateError(EGLint errorId); private: bool ImplementFallback(const std::string_view& function); EGLDisplay m_defaultDisplay; DynLib m_eglLib; }; } #include #endif