Skip to content
Permalink
Browse files

iOS: Ignore gl3stubInit() on iOS, to avoid warnings.

It always returns true anyway.
  • Loading branch information...
unknownbrackets committed Aug 17, 2019
1 parent 9f98f44 commit 8d3a4fae8e3ef1fa7e75ea01110111746d96bfb1
Showing with 11 additions and 7 deletions.
  1. +8 −6 ext/native/gfx_es2/gl3stub.c
  2. +3 −1 ext/native/gfx_es2/gl3stub.h
@@ -14,15 +14,14 @@
* limitations under the License.
*/

#include "ppsspp_config.h"
#include "../gfx/gl_common.h"

#if defined(USING_GLES2)
#if !defined(IOS)
#if !PPSSPP_PLATFORM(IOS)
#include "EGL/egl.h"
#endif

GLboolean gl3stubInit() {
#if !defined(IOS)
#define FIND_PROC(s) s = (void*)eglGetProcAddress(#s)
FIND_PROC(glReadBuffer);
FIND_PROC(glDrawRangeElements);
@@ -145,7 +144,6 @@ GLboolean gl3stubInit() {

#undef FIND_PROC

#endif // IOS
if (!glReadBuffer ||
!glDrawRangeElements ||
!glTexImage3D ||
@@ -257,8 +255,6 @@ GLboolean gl3stubInit() {
return GL_TRUE;
}

#if !defined(IOS)

/* Function pointer definitions */
GL_APICALL void (* GL_APIENTRY glReadBuffer) (GLenum mode);
GL_APICALL void (* GL_APIENTRY glDrawRangeElements) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices);
@@ -379,6 +375,12 @@ GL_APICALL void (* GL_APIENTRY glBufferStorageEXT) (GLenum target, GLs
/* OES_copy_image, etc. */
GL_APICALL void (* GL_APIENTRY glCopyImageSubDataOES) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);

#else

GLboolean gl3stubInit() {
return GL_TRUE;
}

#endif // IOS

#endif // GLES2
@@ -11,6 +11,8 @@
* - Added gl3stubInit() declaration
*/

#include "ppsspp_config.h"

#if defined(USING_GLES2)

#ifdef __cplusplus
@@ -45,7 +47,7 @@ extern "C" {
* otherwise. */
GLboolean gl3stubInit();

#if !defined(IOS)
#if !PPSSPP_PLATFORM(IOS)

/*-------------------------------------------------------------------------
* Data type definitions

0 comments on commit 8d3a4fa

Please sign in to comment.
You can’t perform that action at this time.