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
7 #if defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
9 #include "IContextManager.h"
18 // Manager for SDL with OpenGL
19 class CSDLManager
: public IContextManager
22 CSDLManager(CIrrDeviceSDL
*device
);
24 virtual ~CSDLManager() {}
26 bool initialize(const SIrrlichtCreationParameters
¶ms
, const SExposedVideoData
&data
) override
;
28 void terminate() override
{};
29 bool generateSurface() override
{ return true; };
30 void destroySurface() override
{};
31 bool generateContext() override
{ return true; };
32 void destroyContext() override
{};
34 const SExposedVideoData
&getContext() const override
;
36 bool activateContext(const SExposedVideoData
&videoData
, bool restorePrimaryOnZero
= false) override
;
38 void *getProcAddress(const std::string
&procName
) override
;
40 bool swapBuffers() override
;
43 SExposedVideoData Data
;
44 CIrrDeviceSDL
*SDLDevice
;