18 std::optional<std::string_view>
Start(
const StringList ¶m)
override;
35 std::string_view
GetName()
const override {
return "sdl-opengl"; }
41 void Paint()
override;
57 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)
Create the video driver.
void Paint() override
Paint the window.
void ReleaseVideoPointer() override
Hand video buffer back to the painting backend.
void * gl_context
OpenGL context.
std::string_view GetName() const override
Get the name of this driver.
void DestroyContext()
Destroy and release the OpenGL context.
uint8_t * GetAnimBuffer() override
Get a pointer to the animation buffer of the video back-end.
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.
uint8_t * anim_buffer
Animation buffer from OpenGL back-end.
VideoDriver_SDL_OpenGL()
Create the driver.
bool HasAnimBuffer() override
Does this video driver support a separate animation buffer in addition to the colour buffer?
@ Video
Speed of painting drawn video buffer.
Base of the SDL2 video driver.
std::vector< std::string > StringList
Type for a list of strings.