Add basic EGL support

This commit is contained in:
Jérôme Leclercq
2020-09-01 18:46:35 +02:00
parent 07a02ecfcd
commit ef737a8ecd
29 changed files with 1122 additions and 94 deletions

View File

@@ -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);

View File

@@ -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>

View File

@@ -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);

View File

@@ -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