Move SMaterial std::hash impl to its header
[minetest.git] / irr / src / CSDLManager.h
blob22efeb1ee23b928bec80895ee995f129570a274c
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 #pragma once
7 #if defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
9 #include "IContextManager.h"
11 namespace irr
13 class CIrrDeviceSDL;
15 namespace video
18 // Manager for SDL with OpenGL
19 class CSDLManager : public IContextManager
21 public:
22 CSDLManager(CIrrDeviceSDL *device);
24 virtual ~CSDLManager() {}
26 bool initialize(const SIrrlichtCreationParameters &params, 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;
42 private:
43 SExposedVideoData Data;
44 CIrrDeviceSDL *SDLDevice;
49 #endif