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
8 #include "IrrCompileConfig.h"
\r
10 #ifdef _IRR_COMPILE_WITH_WGL_MANAGER_
\r
12 #include "SIrrCreationParameters.h"
\r
13 #include "SExposedVideoData.h"
\r
14 #include "IContextManager.h"
\r
17 #define WIN32_LEAN_AND_MEAN
\r
18 #include <windows.h>
\r
19 #include <libloaderapi.h>
\r
26 class CWGLManager : public IContextManager
\r
36 bool initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data) override;
\r
39 void terminate() override;
\r
42 bool generateSurface() override;
\r
45 void destroySurface() override;
\r
48 bool generateContext() override;
\r
50 // Destroy EGL context.
\r
51 void destroyContext() override;
\r
53 //! Get current context
\r
54 const SExposedVideoData& getContext() const override;
\r
56 //! Change render context, disable old and activate new defined by videoData
\r
57 bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero) override;
\r
59 // Get procedure address.
\r
60 void* getProcAddress(const std::string &procName) override;
\r
63 bool swapBuffers() override;
\r
66 SIrrlichtCreationParameters Params;
\r
67 SExposedVideoData PrimaryContext;
\r
68 SExposedVideoData CurrentContext;
\r
70 PIXELFORMATDESCRIPTOR pfd;
\r
71 ECOLOR_FORMAT ColorFormat;
\r
72 void* FunctionPointers[1];
\r