mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-10 18:21:14 +00:00
Fix build errors on macOS 26. (#728)
* Fix build errors on macOS 26. * Use OpenGLES for iOS, OpenGL for macOS. * Correct a typo in the target defines.
This commit is contained in:
parent
47736862a7
commit
d6aaa6b9da
@ -1,8 +1,21 @@
|
||||
#include "d3drmrenderer_opengles2.h"
|
||||
#include "meshutils.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#if TARGET_OS_IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glext.h>
|
||||
#define GL_DEPTH_COMPONENT24_OES GL_DEPTH_COMPONENT24
|
||||
#define GL_DEPTH_COMPONENT32_OES GL_DEPTH_COMPONENT32
|
||||
#endif
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
#include <SDL3/SDL.h>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
@ -1,8 +1,22 @@
|
||||
#include "d3drmrenderer_opengles3.h"
|
||||
#include "meshutils.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#if TARGET_OS_IOS
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#include <OpenGLES/ES3/gl.h>
|
||||
#else
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glext.h>
|
||||
#define glBindVertexArray glBindVertexArrayAPPLE
|
||||
#define glGenVertexArrays glGenVertexArraysAPPLE
|
||||
#define glDeleteVertexArrays glDeleteVertexArraysAPPLE
|
||||
#endif
|
||||
#else
|
||||
#include <GLES2/gl2ext.h>
|
||||
#include <GLES3/gl3.h>
|
||||
#endif
|
||||
#include <SDL3/SDL.h>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
@ -4,7 +4,16 @@
|
||||
#include "d3drmtexture_impl.h"
|
||||
#include "ddraw_impl.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#if TARGET_OS_IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#else
|
||||
#include <OpenGL/gl.h>
|
||||
#endif
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#endif
|
||||
#include <SDL3/SDL.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@ -4,7 +4,16 @@
|
||||
#include "d3drmtexture_impl.h"
|
||||
#include "ddraw_impl.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#if TARGET_OS_IOS
|
||||
#include <OpenGLES/ES3/gl.h>
|
||||
#else
|
||||
#include <OpenGL/gl.h>
|
||||
#endif
|
||||
#else
|
||||
#include <GLES3/gl3.h>
|
||||
#endif
|
||||
#include <SDL3/SDL.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user