10#ifndef VIDEO_COCOA_OGL_H
11#define VIDEO_COCOA_OGL_H
15@class OTTD_OpenGLView;
22 std::optional<std::string_view> AllocateContext(
bool allow_software);
27 std::optional<std::string_view>
Start(
const StringList ¶m)
override;
38 std::string_view
GetName()
const override {
return "cocoa-opengl"; }
40 std::string_view
GetInfoString()
const override {
return this->driver_info; }
45 void Paint()
override;
56 std::unique_ptr<Driver>
CreateInstance()
const override {
return std::make_unique<VideoDriver_CocoaOpenGL>(); }
DriverFactoryBase(Driver::Type type, int priority, std::string_view name, std::string_view description)
Construct a new DriverFactory.
std::unique_ptr< Driver > CreateInstance() const override
Create an instance of this driver-class.
bool UsesHardwareAcceleration() const override
Does the driver use hardware acceleration (video-drivers only).
CGLContextObj gl_context
The OpenGL context.
void * GetVideoPointer() override
Get a pointer to the video buffer.
std::string driver_info
Information string about selected driver.
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
Get the name of this driver.
void Paint() override
Paint the window.
bool HasEfficient8Bpp() const override
Has this video driver an efficient code path for palette animated 8-bpp sprites?
NSView * AllocateDrawView() override
Allocate the view to show the game on.
std::string_view GetInfoString() const override
Get some information about the selected driver/backend to be shown to the user.
void ClearSystemSprites() override
Clear all cached sprites.
void Stop() override
Stop Cocoa video driver.
void AllocateBackingStore(bool force=false) override
Resize the window.
bool UseSystemCursor() override
Get whether the mouse cursor is drawn by the video driver.
VideoDriver_Cocoa(bool uses_hardware_acceleration=false, bool supports_animation_buffer=false)
Create the video driver.
std::vector< std::string > StringList
Type for a list of strings.