1 // Copyright (C) 2013 Christian Stehno
\r
2 // This file is part of the "Irrlicht Engine".
\r
3 // For conditions of distribution and use, see copyright notice in Irrlicht.h
\r
5 #ifndef __C_WGL_MANAGER_H_INCLUDED__
\r
6 #define __C_WGL_MANAGER_H_INCLUDED__
\r
9 #ifdef _IRR_COMPILE_WITH_WGL_MANAGER_
\r
11 #include "SIrrCreationParameters.h"
\r
12 #include "SExposedVideoData.h"
\r
13 #include "IContextManager.h"
\r
16 #define WIN32_LEAN_AND_MEAN
\r
17 #include <windows.h>
\r
18 #include <libloaderapi.h>
\r
25 class CWGLManager : public IContextManager
\r
35 bool initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data) override;
\r
38 void terminate() override;
\r
41 bool generateSurface() override;
\r
44 void destroySurface() override;
\r
47 bool generateContext() override;
\r
49 // Destroy EGL context.
\r
50 void destroyContext() override;
\r
52 //! Get current context
\r
53 const SExposedVideoData& getContext() const override;
\r
55 //! Change render context, disable old and activate new defined by videoData
\r
56 bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero) override;
\r
58 // Get procedure address.
\r
59 void* getProcAddress(const std::string &procName) override;
\r
62 bool swapBuffers() override;
\r
65 SIrrlichtCreationParameters Params;
\r
66 SExposedVideoData PrimaryContext;
\r
67 SExposedVideoData CurrentContext;
\r
69 PIXELFORMATDESCRIPTOR pfd;
\r
70 ECOLOR_FORMAT ColorFormat;
\r
71 void* FunctionPointers[1];
\r