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 #include "CSDLManager.h"
7 #if defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && defined(_IRR_COMPILE_WITH_OPENGL_)
9 #include "CIrrDeviceSDL.h"
10 #include "COpenGLCommon.h"
17 CSDLManager::CSDLManager(CIrrDeviceSDL* device) : IContextManager(), SDLDevice(device)
20 setDebugName("CSDLManager");
24 bool CSDLManager::initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data)
30 const SExposedVideoData& CSDLManager::getContext() const
35 bool CSDLManager::activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero)
37 // unclear if this is still needed:
42 void* CSDLManager::getProcAddress(const std::string &procName)
44 return SDL_GL_GetProcAddress(procName.c_str());
47 bool CSDLManager::swapBuffers()
49 SDLDevice->SwapWindow();