iOS opengles extensions imports
This commit is contained in:
parent
070ab4c693
commit
c550fbf229
|
|
@ -38,6 +38,12 @@ set(raylib_sources
|
|||
rtextures.c
|
||||
)
|
||||
|
||||
if (${PLATFORM} STREQUAL "iOS")
|
||||
list(APPEND raylib_sources
|
||||
rcore_ios_main.m
|
||||
)
|
||||
endif()
|
||||
|
||||
# <root>/cmake/GlfwImport.cmake handles the details around the inclusion of glfw
|
||||
if (NOT ${PLATFORM} MATCHES "Web")
|
||||
include(GlfwImport)
|
||||
|
|
@ -104,6 +110,11 @@ target_link_libraries(raylib PUBLIC ${LIBS_PUBLIC})
|
|||
# and you will be able to select more build options
|
||||
include(CompileDefinitions)
|
||||
|
||||
if (${PLATFORM} STREQUAL "iOS")
|
||||
target_compile_definitions(raylib PRIVATE GLES_SILENCE_DEPRECATION=1)
|
||||
target_compile_options(raylib PRIVATE -Wno-deprecated-declarations)
|
||||
endif()
|
||||
|
||||
# Registering include directories
|
||||
target_include_directories(raylib
|
||||
PUBLIC
|
||||
|
|
|
|||
13
src/rlgl.h
13
src/rlgl.h
|
|
@ -876,9 +876,16 @@ RLAPI void rlLoadDrawQuad(void); // Load and draw a quad
|
|||
#endif
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_ES3)
|
||||
#include <GLES3/gl3.h> // OpenGL ES 3.0 library
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GLES2/gl2ext.h> // OpenGL ES 2.0 extensions library
|
||||
#if defined(PLATFORM_IOS)
|
||||
#include <OpenGLES/ES3/gl.h> // OpenGL ES 3.0 library
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <OpenGLES/ES2/glext.h> // OpenGL ES extensions used by raylib
|
||||
#include <OpenGLES/ES3/glext.h> // OpenGL ES 3.0 extensions library
|
||||
#else
|
||||
#include <GLES3/gl3.h> // OpenGL ES 3.0 library
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GLES2/gl2ext.h> // OpenGL ES 2.0 extensions library
|
||||
#endif
|
||||
#elif defined(GRAPHICS_API_OPENGL_ES2)
|
||||
// NOTE: OpenGL ES 2.0 can be enabled on Desktop platforms,
|
||||
// in that case, functions are loaded from a custom glad for OpenGL ES 2.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user