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
9 #ifdef _IRR_COMPILE_WITH_EAGL_MANAGER_
\r
11 #include "SIrrCreationParameters.h"
\r
12 #include "SExposedVideoData.h"
\r
13 #include "IContextManager.h"
\r
20 class CEAGLManager : public IContextManager
\r
27 virtual ~CEAGLManager();
\r
30 /* This method checks if a view has CAEAGLLayer and grabs it if it does, anyway surface and context
\r
32 bool initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data);
\r
35 /* Terminate EAGL context. This method break both existed surface and context. */
\r
38 // Create EAGL surface.
\r
39 /* This method configure CAEAGLLayer. */
\r
40 bool generateSurface();
\r
42 // Destroy EAGL surface.
\r
43 /* This method reset CAEAGLLayer states. */
\r
44 void destroySurface();
\r
46 // Create EAGL context.
\r
47 /* This method create and activate EAGL context. */
\r
48 bool generateContext();
\r
50 // Destroy EAGL context.
\r
51 /* This method destroy EAGL context. */
\r
52 void destroyContext();
\r
54 const SExposedVideoData& getContext() const;
\r
56 bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero);
\r
62 SIrrlichtCreationParameters Params;
\r
63 SExposedVideoData Data;
\r
71 SFrameBuffer() : BufferID(0), ColorBuffer(0), DepthBuffer(0)
\r
80 SFrameBuffer FrameBuffer;
\r