Changeset - r25720:e338424ce8cb
[Not reviewed]
master
0 2 0
Michael Lutz - 3 years ago 2021-06-21 23:40:40
michi@icosahedron.de
Codechange: [OSX] We use OpenGL even if Apple doesn't like it.
2 files changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/video/cocoa/cocoa_ogl.mm
Show inline comments
 
@@ -3,24 +3,26 @@
 
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file cocoa_ogl.mm Code related to the cocoa OpengL video driver. */
 

	
 
#ifdef WITH_COCOA
 

	
 
#include "../../stdafx.h"
 
#include "../../os/macosx/macos.h"
 

	
 
#define GL_SILENCE_DEPRECATION
 

	
 
#define Rect  OTTDRect
 
#define Point OTTDPoint
 
#import <Cocoa/Cocoa.h>
 
#import <QuartzCore/QuartzCore.h>
 
#undef Rect
 
#undef Point
 

	
 
#include "../../openttd.h"
 
#include "../../debug.h"
 
#include "../../core/geometry_func.hpp"
 
#include "../../core/math_func.hpp"
 
#include "../../core/mem_func.hpp"
src/video/opengl.cpp
Show inline comments
 
@@ -13,24 +13,25 @@
 

	
 
/* Define to disable buffer syncing. Will increase max fast forward FPS but produces artifacts. Mainly useful for performance testing. */
 
// #define NO_GL_BUFFER_SYNC
 
/* Define to allow software rendering backends. */
 
// #define GL_ALLOW_SOFTWARE_RENDERER
 

	
 
#if defined(_WIN32)
 
#	include <windows.h>
 
#endif
 

	
 
#define GL_GLEXT_PROTOTYPES
 
#if defined(__APPLE__)
 
#	define GL_SILENCE_DEPRECATION
 
#	include <OpenGL/gl3.h>
 
#else
 
#	include <GL/gl.h>
 
#endif
 
#include "../3rdparty/opengl/glext.h"
 

	
 
#include "opengl.h"
 
#include "../core/geometry_func.hpp"
 
#include "../core/mem_func.hpp"
 
#include "../core/math_func.hpp"
 
#include "../core/mem_func.hpp"
 
#include "../gfx_func.h"
0 comments (0 inline, 0 general)