10#ifndef VIDEO_COCOA_OGL_H
11#define VIDEO_COCOA_OGL_H
15@class OTTD_OpenGLView;
18 CGLContextObj gl_context;
23 std::optional<std::string_view> AllocateContext(
bool allow_software);
43 std::string_view
GetName()
const override {
return "cocoa-opengl"; }
45 std::string_view GetInfoString()
const override {
return this->
driver_info; }
47 void AllocateBackingStore(
bool force =
false)
override;
55 NSView *AllocateDrawView()
override;
Base for all driver factories.
A driver for communicating with the user.
@ DT_VIDEO
A video driver.
bool UsesHardwareAcceleration() const override
Does the driver use hardware acceleration (video-drivers only).
Driver * CreateInstance() const override
Create an instance of this driver-class.
uint8_t * anim_buffer
Animation buffer from OpenGL back-end.
void * GetVideoPointer() override
Get a pointer to the video buffer.
std::string driver_info
Information string about selected driver.
uint8_t * GetAnimBuffer() override
Get a pointer to the animation buffer of the video back-end.
void PopulateSystemSprites() override
Populate all sprites in cache.
void ReleaseVideoPointer() override
Hand video buffer back to the drawing backend.
std::optional< std::string_view > Start(const StringList ¶m) override
Start this driver.
std::string_view GetName() const override
Return driver name.
void Paint() override
Paint the window.
bool HasEfficient8Bpp() const override
Has this video driver an efficient code path for palette animated 8-bpp sprites?
bool HasAnimBuffer() override
Does this video driver support a separate animation buffer in addition to the colour buffer?
void ClearSystemSprites() override
Clear all cached sprites.
void Stop() override
Stop this driver.
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.