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
5 #ifndef __C_SDL_MANAGER_H_INCLUDED__
6 #define __C_SDL_MANAGER_H_INCLUDED__
9 #if defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && defined(_IRR_COMPILE_WITH_OPENGL_)
11 #include "IContextManager.h"
20 // Manager for SDL with OpenGL
21 class CSDLManager : public IContextManager
24 CSDLManager(CIrrDeviceSDL* device);
26 virtual ~CSDLManager() {}
28 bool initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data) override;
30 void terminate() override {};
31 bool generateSurface() override { return true; };
32 void destroySurface() override {};
33 bool generateContext() override { return true; };
34 void destroyContext() override {};
36 const SExposedVideoData& getContext() const override;
38 bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero=false) override;
40 void* getProcAddress(const std::string &procName) override;
42 bool swapBuffers() override;
45 SExposedVideoData Data;
46 CIrrDeviceSDL *SDLDevice;