mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-02 05:16:33 +00:00
(Apple) Add workarounds for Apple when not using GL core profile
This commit is contained in:
parent
b9dde5320f
commit
1be3042ef9
@ -1668,8 +1668,12 @@ void rglCopyImageSubData( GLuint srcName,
|
||||
void rglBindVertexArray(GLuint array)
|
||||
{
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) && defined(HAVE_OPENGLES3)
|
||||
#if defined(__APPLE__) && !defined(CORE) && defined(GL_APPLE_vertex_array_object) && !defined(GL_ARB_vertex_array_object)
|
||||
glBindVertexArraysAPPLE(array);
|
||||
#else
|
||||
glBindVertexArray(array);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1682,8 +1686,12 @@ void rglBindVertexArray(GLuint array)
|
||||
void rglGenVertexArrays(GLsizei n, GLuint *arrays)
|
||||
{
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) && defined(HAVE_OPENGLES3)
|
||||
#if defined(__APPLE__) && !defined(CORE) && defined(GL_APPLE_vertex_array_object) && !defined(GL_ARB_vertex_array_object)
|
||||
glGenVertexArraysAPPLE(n, arrays);
|
||||
#else
|
||||
glGenVertexArrays(n, arrays);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1696,8 +1704,12 @@ void rglGenVertexArrays(GLsizei n, GLuint *arrays)
|
||||
void rglDeleteVertexArrays(GLsizei n, const GLuint *arrays)
|
||||
{
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) && defined(HAVE_OPENGLES3)
|
||||
#if defined(__APPLE__) && !defined(CORE) && defined(GL_APPLE_vertex_array_object) && !defined(GL_ARB_vertex_array_object)
|
||||
glDeleteVertexArraysAPPLE(n, arrays);
|
||||
#else
|
||||
glDeleteVertexArrays(n, arrays);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/* GLSM-side */
|
||||
@ -1824,7 +1836,7 @@ static void glsm_state_bind(void)
|
||||
gl_state.viewport.w,
|
||||
gl_state.viewport.h);
|
||||
#ifdef CORE
|
||||
glBindVertexArray(gl_state.vao);
|
||||
rglBindVertexArray(gl_state.vao);
|
||||
#endif
|
||||
for(i = 0; i < SGL_CAP_MAX; i ++)
|
||||
{
|
||||
@ -1864,7 +1876,7 @@ static void glsm_state_unbind(void)
|
||||
{
|
||||
unsigned i;
|
||||
#ifdef CORE
|
||||
glBindVertexArray(0);
|
||||
rglBindVertexArray(0);
|
||||
#endif
|
||||
for (i = 0; i < SGL_CAP_MAX; i ++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user