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 virtual bool initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data) _IRR_OVERRIDE_;
\r
39 virtual void terminate() _IRR_OVERRIDE_;
\r
42 virtual bool generateSurface() _IRR_OVERRIDE_;
\r
45 virtual void destroySurface() _IRR_OVERRIDE_;
\r
48 virtual bool generateContext() _IRR_OVERRIDE_;
\r
50 // Destroy EGL context.
\r
51 virtual void destroyContext() _IRR_OVERRIDE_;
\r
53 //! Get current context
\r
54 virtual const SExposedVideoData& getContext() const _IRR_OVERRIDE_;
\r
56 //! Change render context, disable old and activate new defined by videoData
\r
57 virtual bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero) _IRR_OVERRIDE_;
\r
59 // Get procedure address.
\r
60 virtual void* getProcAddress(const std::string &procName) _IRR_OVERRIDE_;
\r
63 virtual bool swapBuffers() _IRR_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