11#include <SDL3/SDL_video.h>
19 std::optional<std::string_view>
Start(
const StringList ¶m)
override;
33 std::string_view
GetName()
const override {
return "sdl-opengl"; }
39 void Paint()
override;
54 std::unique_ptr<Driver>
CreateInstance()
const override {
return std::make_unique<VideoDriver_SDL_OpenGL>(); }
DriverFactoryBase(Driver::Type type, int priority, std::string_view name, std::string_view description)
Construct a new DriverFactory.
A driver for communicating with the user.
bool UsesHardwareAcceleration() const override
Does the driver use hardware acceleration (video-drivers only).
FVideoDriver_SDL_OpenGL()
Create the factory.
std::unique_ptr< Driver > CreateInstance() const override
Create an instance of this driver-class.
VideoDriver_SDL_Base(bool uses_hardware_acceleration=false, bool supports_animation_buffer=false)
Create the video driver.
void Paint() override
Paint the window.
void ReleaseVideoPointer() override
Hand video buffer back to the painting backend.
std::string_view GetName() const override
Get the name of this driver.
void DestroyContext()
Destroy and release the OpenGL context.
bool HasEfficient8Bpp() const override
Has this video driver an efficient code path for palette animated 8-bpp sprites?
void ToggleVsync(bool vsync) override
Change the vsync setting.
bool CreateMainWindow(uint w, uint h, uint flags) override
Create the main window.
void * GetVideoPointer() override
Get a pointer to the video buffer.
void Stop() override
Stop this driver.
std::optional< std::string_view > AllocateContext()
Allocate the OpenGL context.
bool UseSystemCursor() override
Get whether the mouse cursor is drawn by the video driver.
void ClearSystemSprites() override
Clear all cached sprites.
bool AllocateBackingStore(int w, int h, bool force=false) override
(Re-)create the backing store.
std::optional< std::string_view > Start(const StringList ¶m) override
Start this driver.
void PopulateSystemSprites() override
Populate all sprites in cache.
SDL_GLContext gl_context
OpenGL context.
VideoDriver_SDL_OpenGL()
Create the driver.
@ Video
Speed of painting drawn video buffer.
Base of the SDL3 video driver.
std::vector< std::string > StringList
Type for a list of strings.