Renderer: Split OpenGL and OpenGL ES in two RenderAPI enums
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Nz
|
||||
bool Prepare(const Renderer::Config& config) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<GL::Loader> SelectLoader();
|
||||
std::unique_ptr<GL::Loader> SelectLoader(const Renderer::Config& config);
|
||||
|
||||
std::shared_ptr<OpenGLDevice> m_device;
|
||||
std::unique_ptr<GL::Loader> m_loader;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <Nazara/OpenGLRenderer/Config.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Loader.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/EGL/EGLContextBase.hpp>
|
||||
#include <Nazara/Renderer/Renderer.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace Nz::GL
|
||||
@@ -21,7 +22,7 @@ namespace Nz::GL
|
||||
friend SymbolLoader;
|
||||
|
||||
public:
|
||||
EGLLoader();
|
||||
EGLLoader(const Renderer::Config& config);
|
||||
~EGLLoader();
|
||||
|
||||
std::unique_ptr<Context> CreateContext(const OpenGLDevice* device, const ContextParams& params, Context* shareContext) const override;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Loader.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/WGL/WGLContext.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/WGL/WGLFunctions.hpp>
|
||||
#include <Nazara/Renderer/Renderer.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace Nz::GL
|
||||
@@ -20,7 +21,7 @@ namespace Nz::GL
|
||||
class NAZARA_OPENGLRENDERER_API WGLLoader : public Loader
|
||||
{
|
||||
public:
|
||||
WGLLoader();
|
||||
WGLLoader(const Renderer::Config& config);
|
||||
~WGLLoader() = default;
|
||||
|
||||
std::unique_ptr<Context> CreateContext(const OpenGLDevice* device, const ContextParams& params, Context* shareContext) const override;
|
||||
|
||||
@@ -127,13 +127,14 @@ namespace Nz
|
||||
|
||||
enum class RenderAPI
|
||||
{
|
||||
Direct3D, ///< Microsoft Render API, only works on MS platforms
|
||||
Mantle, ///< AMD Render API, Vulkan predecessor, only works on AMD GPUs
|
||||
Metal, ///< Apple Render API, only works on OS X platforms
|
||||
OpenGL, ///< Khronos Render API, works on Web/Desktop/Mobile and some consoles
|
||||
Vulkan, ///< New Khronos Render API, made to replace OpenGL, works on desktop (Windows/Linux) and mobile (Android), and Apple platform using MoltenVK
|
||||
Direct3D, //< Microsoft Render API, only works on MS platforms
|
||||
Mantle, //< AMD Render API, Vulkan predecessor, only works on AMD GPUs
|
||||
Metal, //< Apple Render API, only works on OS X platforms
|
||||
OpenGL, //< Khronos Render API, works on Desktop and some consoles
|
||||
OpenGL_ES, //< Khronos Render API, works on Web, Mobile and some consoles
|
||||
Vulkan, //< New Khronos Render API, made to replace OpenGL, works on desktop (Windows/Linux) and mobile (Android), and Apple platform using MoltenVK
|
||||
|
||||
Unknown, ///< RenderAPI not corresponding to an entry of the enum, or result of a failed query
|
||||
Unknown, //< RenderAPI not corresponding to an entry of the enum, or result of a failed query
|
||||
|
||||
Max = Unknown
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user