DDraceNetwork Documentation
Loading...
Searching...
No Matches
backend_sdl.cpp File Reference
#include <base/detect.h>
#include <GL/glew.h>
#include <base/log.h>
#include <base/math.h>
#include <base/tl/threading.h>
#include <engine/shared/config.h>
#include <engine/shared/localization.h>
#include <SDL.h>
#include <SDL_messagebox.h>
#include <SDL_vulkan.h>
#include <engine/shared/video.h>
#include "backend_sdl.h"
#include "backend/opengl/backend_opengl3.h"
#include "graphics_threaded.h"
#include <engine/graphics.h>
#include <algorithm>
#include <cstdlib>
Include dependency graph for backend_sdl.cpp:

Functions

static bool BackendInitGlew (EBackendType BackendType, int &GlewMajor, int &GlewMinor, int &GlewPatch)
static int IsVersionSupportedGlew (EBackendType BackendType, int VersionMajor, int VersionMinor, int VersionPatch, int GlewMajor, int GlewMinor, int GlewPatch)
static Uint32 MessageBoxTypeToSdlFlags (IGraphics::EMessageBoxType Type)
static std::optional< int > ShowMessageBoxImpl (const IGraphics::CMessageBox &MessageBox, SDL_Window *pWindow)
std::optional< int > ShowMessageBoxWithoutGraphics (const IGraphics::CMessageBox &MessageBox)
static void DisplayToVideoMode (CVideoMode *pVMode, SDL_DisplayMode *pMode, float HiDPIScale, int RefreshRate)
IGraphicsBackendCreateGraphicsBackend (TTranslateFunc &&TranslateFunc)

Function Documentation

◆ BackendInitGlew()

bool BackendInitGlew ( EBackendType BackendType,
int & GlewMajor,
int & GlewMinor,
int & GlewPatch )
static

◆ CreateGraphicsBackend()

IGraphicsBackend * CreateGraphicsBackend ( TTranslateFunc && TranslateFunc)

◆ DisplayToVideoMode()

void DisplayToVideoMode ( CVideoMode * pVMode,
SDL_DisplayMode * pMode,
float HiDPIScale,
int RefreshRate )
static

◆ IsVersionSupportedGlew()

int IsVersionSupportedGlew ( EBackendType BackendType,
int VersionMajor,
int VersionMinor,
int VersionPatch,
int GlewMajor,
int GlewMinor,
int GlewPatch )
static

◆ MessageBoxTypeToSdlFlags()

Uint32 MessageBoxTypeToSdlFlags ( IGraphics::EMessageBoxType Type)
static

◆ ShowMessageBoxImpl()

std::optional< int > ShowMessageBoxImpl ( const IGraphics::CMessageBox & MessageBox,
SDL_Window * pWindow )
static

◆ ShowMessageBoxWithoutGraphics()

std::optional< int > ShowMessageBoxWithoutGraphics ( const IGraphics::CMessageBox & MessageBox)

This function should only be used when the graphics are not initialized or when IGraphics::ShowMessageBox failed.

See also
IGraphics::ShowMessageBox