1 // Copyright (C) 2015 Patryk Nadrowski
\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_EAGL_MANAGER_H_INCLUDED__
\r
6 #define __C_EAGL_MANAGER_H_INCLUDED__
\r
8 #include "IrrCompileConfig.h"
\r
10 #ifdef _IRR_COMPILE_WITH_EAGL_MANAGER_
\r
12 #include "SIrrCreationParameters.h"
\r
13 #include "SExposedVideoData.h"
\r
14 #include "IContextManager.h"
\r
21 class CEAGLManager : public IContextManager
\r
28 virtual ~CEAGLManager();
\r
31 /* This method checks if a view has CAEAGLLayer and grabs it if it does, anyway surface and context
\r
33 bool initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data);
\r
36 /* Terminate EAGL context. This method break both existed surface and context. */
\r
39 // Create EAGL surface.
\r
40 /* This method configure CAEAGLLayer. */
\r
41 bool generateSurface();
\r
43 // Destroy EAGL surface.
\r
44 /* This method reset CAEAGLLayer states. */
\r
45 void destroySurface();
\r
47 // Create EAGL context.
\r
48 /* This method create and activate EAGL context. */
\r
49 bool generateContext();
\r
51 // Destroy EAGL context.
\r
52 /* This method destroy EAGL context. */
\r
53 void destroyContext();
\r
55 const SExposedVideoData& getContext() const;
\r
57 bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero);
\r
63 SIrrlichtCreationParameters Params;
\r
64 SExposedVideoData Data;
\r
72 SFrameBuffer() : BufferID(0), ColorBuffer(0), DepthBuffer(0)
\r
81 SFrameBuffer FrameBuffer;
\r