Add basic EGL support
This commit is contained in:
@@ -10,20 +10,19 @@
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/DynLib.hpp>
|
||||
#include <Nazara/Platform/WindowHandle.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Config.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Context.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/WGL/Win32Helper.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Win32/Win32Helper.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/WGL/WGLFunctions.hpp>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <unordered_set>
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN //< Redefined by OpenGL header (ty Khronos)
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/WGL/WGLFunctions.hpp>
|
||||
|
||||
namespace Nz::GL
|
||||
{
|
||||
class WGLLoader;
|
||||
|
||||
class WGLContext : public Context
|
||||
class NAZARA_OPENGLRENDERER_API WGLContext : public Context
|
||||
{
|
||||
public:
|
||||
inline WGLContext(const OpenGLDevice* device, const WGLLoader& loader);
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef NAZARA_OPENGLRENDERER_WGLFUNCTIONS_HPP
|
||||
#define NAZARA_OPENGLRENDERER_WGLFUNCTIONS_HPP
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN //< Redefined by wgl.h header (ty Khronos)
|
||||
|
||||
#include <GLES3/gl3.h>
|
||||
#include <GL/wgl.h>
|
||||
#include <GL/wglext.h>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/DynLib.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Config.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Loader.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/WGL/WGLContext.hpp>
|
||||
#include <string>
|
||||
@@ -18,7 +19,7 @@
|
||||
|
||||
namespace Nz::GL
|
||||
{
|
||||
class WGLLoader : public Loader
|
||||
class NAZARA_OPENGLRENDERER_API WGLLoader : public Loader
|
||||
{
|
||||
public:
|
||||
WGLLoader(DynLib& openglLib);
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
// 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_WIN32HELPER_HPP
|
||||
#define NAZARA_OPENGLRENDERER_WIN32HELPER_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <windows.h>
|
||||
|
||||
namespace Nz::GL
|
||||
{
|
||||
struct WindowDeleter
|
||||
{
|
||||
void operator()(HWND handle) const
|
||||
{
|
||||
DestroyWindow(handle);
|
||||
}
|
||||
};
|
||||
|
||||
using HWNDHandle = std::unique_ptr<std::remove_pointer_t<HWND>, WindowDeleter>;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user