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