]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/CSDLManager.h
Fix OpenGL3 driver to compile standalone
[irrlicht.git] / source / Irrlicht / CSDLManager.h
1 // Copyright (C) 2022 sfan5
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in Irrlicht.h
4
5 #ifndef __C_SDL_MANAGER_H_INCLUDED__
6 #define __C_SDL_MANAGER_H_INCLUDED__
7
8
9 #if defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
10
11 #include "IContextManager.h"
12
13 namespace irr
14 {
15         class CIrrDeviceSDL;
16
17 namespace video
18 {
19
20         // Manager for SDL with OpenGL
21         class CSDLManager : public IContextManager
22         {
23         public:
24                 CSDLManager(CIrrDeviceSDL* device);
25
26                 virtual ~CSDLManager() {}
27
28                 bool initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data) override;
29
30                 void terminate() override {};
31                 bool generateSurface() override { return true; };
32                 void destroySurface() override {};
33                 bool generateContext() override { return true; };
34                 void destroyContext() override {};
35
36                 const SExposedVideoData& getContext() const override;
37
38                 bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero=false) override;
39
40                 void* getProcAddress(const std::string &procName) override;
41
42                 bool swapBuffers() override;
43
44         private:
45                 SExposedVideoData Data;
46                 CIrrDeviceSDL *SDLDevice;
47         };
48 }
49 }
50
51 #endif
52 #endif