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_)
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)
40 void* CSDLManager::getProcAddress(const std::string &procName)
42 return SDL_GL_GetProcAddress(procName.c_str());
45 bool CSDLManager::swapBuffers()
47 SDLDevice->SwapWindow();