OpenTTD Source
20240919-master-gdf0233f4c2
|
Go to the documentation of this file.
17 std::optional<std::string_view>
Start(
const StringList ¶m)
override;
32 void ToggleVsync(
bool vsync)
override;
34 std::string_view
GetName()
const override {
return "sdl-opengl"; }
40 void Paint()
override;
47 std::optional<std::string_view> AllocateContext();
48 void DestroyContext();
bool HasAnimBuffer() override
Does this video driver support a separate animation buffer in addition to the colour buffer?
std::optional< std::string_view > Start(const StringList ¶m) override
Start this driver.
The OpenGL video driver for windows.
bool AllocateBackingStore(int w, int h, bool force=false) override
(Re-)create the backing store.
std::string_view GetName() const override
Get the name of this driver.
void Stop() override
Stop this driver.
bool CreateMainWindow(uint w, uint h, uint flags) override
Create the main window.
DriverFactoryBase(Driver::Type type, int priority, const char *name, const char *description)
Construct a new DriverFactory.
void PopulateSystemSprites() override
Populate all sprites in cache.
Driver * CreateInstance() const override
Create an instance of this driver-class.
bool UsesHardwareAcceleration() const override
Does the driver use hardware acceleration (video-drivers only).
bool HasEfficient8Bpp() const override
Has this video driver an efficient code path for palette animated 8-bpp sprites?
void Paint() override
Paint the window.
bool UseSystemCursor() override
Get whether the mouse cursor is drawn by the video driver.
std::vector< std::string > StringList
Type for a list of strings.
void ReleaseVideoPointer() override
Hand video buffer back to the painting backend.
void * GetVideoPointer() override
Get a pointer to the video buffer.
@ DT_VIDEO
A video driver.
The factory for SDL' OpenGL video driver.
uint8_t * GetAnimBuffer() override
Get a pointer to the animation buffer of the video back-end.
A driver for communicating with the user.
void ClearSystemSprites() override
Clear all cached sprites.
void * gl_context
OpenGL context.
Base for all driver factories.
uint8_t * anim_buffer
Animation buffer from OpenGL back-end.