OpenTTD Source 20260311-master-g511d3794ce
cocoa_ogl.mm File Reference

Code related to the cocoa OpengL video driver. More...

#include "../../stdafx.h"
#include "../../os/macosx/macos.h"
#include "../../os/macosx/macos_objective_c.h"
#include "../../openttd.h"
#include "../../debug.h"
#include "../../core/geometry_func.hpp"
#include "../../core/math_func.hpp"
#include "cocoa_ogl.h"
#include "cocoa_wnd.h"
#include "../../blitter/factory.hpp"
#include "../../gfx_func.h"
#include "../../framerate_type.h"
#include "../opengl.h"
import <dlfcn.h>
import <OpenGL/OpenGL.h>
import <OpenGL/gl3.h>

Go to the source code of this file.

Data Structures

class  OTTD_CGLLayer
class  OTTD_CGLLayerView

Macros

#define GL_SILENCE_DEPRECATION
 Macro defined before OpenGL and GLUT includes to avoid deprecation messages.

Functions

static OGLProc GetOGLProcAddressCallback (const char *proc)
 Platform-specific callback to get an OpenGL function pointer.

Variables

static Palette _local_palette
 Current palette to use for drawing.
static bool _allowSoftware
static FVideoDriver_CocoaOpenGL iFVideoDriver_CocoaOpenGL
 Storage for instance of the FVideoDriver_CocoaOpenGL class.

Detailed Description

Code related to the cocoa OpengL video driver.

Attention
Notice regarding all modifications!!!!!!! There are certain limitations because the file is objective C++. gdb has limitations. C++ and objective C code can't be joined in all cases (classes stuff). Read http://developer.apple.com/releasenotes/Cocoa/Objective-C++.html for more information.

Definition in file cocoa_ogl.mm.

Macro Definition Documentation

◆ GL_SILENCE_DEPRECATION

#define GL_SILENCE_DEPRECATION

Macro defined before OpenGL and GLUT includes to avoid deprecation messages.

Definition at line 24 of file cocoa_ogl.mm.

Function Documentation

◆ GetOGLProcAddressCallback()

OGLProc GetOGLProcAddressCallback ( const char * proc)
static

Platform-specific callback to get an OpenGL function pointer.

Parameters
procThe name of the function.
Returns
The function pointer, or nullptr when it could not be found.

Definition at line 49 of file cocoa_ogl.mm.

Variable Documentation

◆ _allowSoftware

bool _allowSoftware
static

Definition at line 73 of file cocoa_ogl.mm.

◆ _local_palette

◆ iFVideoDriver_CocoaOpenGL

FVideoDriver_CocoaOpenGL iFVideoDriver_CocoaOpenGL
static

Storage for instance of the FVideoDriver_CocoaOpenGL class.

Definition at line 183 of file cocoa_ogl.mm.