mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 10:31:16 +00:00
Use OpenGLES for iOS, OpenGL for macOS.
This commit is contained in:
parent
48db410acc
commit
2045b67c4b
@ -2,10 +2,16 @@
|
|||||||
#include "meshutils.h"
|
#include "meshutils.h"
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
#include <TargetConditionals.h>
|
||||||
|
#if defined(TARGET_OS_IOS)
|
||||||
|
#include <OpenGLES/ES2/gl.h>
|
||||||
|
#include <OpenGLES/ES2/glext.h>
|
||||||
|
#else
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
#include <OpenGL/glext.h>
|
#include <OpenGL/glext.h>
|
||||||
#define GL_DEPTH_COMPONENT24_OES GL_DEPTH_COMPONENT24
|
#define GL_DEPTH_COMPONENT24_OES GL_DEPTH_COMPONENT24
|
||||||
#define GL_DEPTH_COMPONENT32_OES GL_DEPTH_COMPONENT32
|
#define GL_DEPTH_COMPONENT32_OES GL_DEPTH_COMPONENT32
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <GLES2/gl2.h>
|
#include <GLES2/gl2.h>
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
|
|||||||
@ -2,11 +2,17 @@
|
|||||||
#include "meshutils.h"
|
#include "meshutils.h"
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
#include <TargetConditionals.h>
|
||||||
|
#if defined(TARGET_OS_IOS)
|
||||||
|
#include <OpenGLES/ES2/glext.h>
|
||||||
|
#include <OpenGLES/ES3/gl.h>
|
||||||
|
#else
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
#include <OpenGL/glext.h>
|
#include <OpenGL/glext.h>
|
||||||
#define glBindVertexArray glBindVertexArrayAPPLE
|
#define glBindVertexArray glBindVertexArrayAPPLE
|
||||||
#define glGenVertexArrays glGenVertexArraysAPPLE
|
#define glGenVertexArrays glGenVertexArraysAPPLE
|
||||||
#define glDeleteVertexArrays glDeleteVertexArraysAPPLE
|
#define glDeleteVertexArrays glDeleteVertexArraysAPPLE
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
#include <GLES3/gl3.h>
|
#include <GLES3/gl3.h>
|
||||||
|
|||||||
@ -5,7 +5,12 @@
|
|||||||
#include "ddraw_impl.h"
|
#include "ddraw_impl.h"
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
#include <TargetConditionals.h>
|
||||||
|
#if defined(TARGET_OS_IOS)
|
||||||
|
#include <OpenGLES/ES2/gl.h>
|
||||||
|
#else
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <GLES2/gl2.h>
|
#include <GLES2/gl2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -5,7 +5,12 @@
|
|||||||
#include "ddraw_impl.h"
|
#include "ddraw_impl.h"
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
#include <TargetConditionals.h>
|
||||||
|
#if defined(TARGET_OS_IOS)
|
||||||
|
#include <OpenGLES/ES3/gl.h>
|
||||||
|
#else
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <GLES3/gl3.h>
|
#include <GLES3/gl3.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user