21 #include "../../SDL_internal.h" 23 #if SDL_VIDEO_DRIVER_COCOA && SDL_VIDEO_OPENGL_EGL 33 Cocoa_GLES_LoadLibrary(
_THIS,
const char *
path) {
37 #if SDL_VIDEO_OPENGL_CGL 38 Cocoa_GLES_UnloadLibrary(
_this);
48 return Cocoa_GL_LoadLibrary(
_this, path);
50 return SDL_SetError(
"SDL not configured with OpenGL/CGL support");
70 Cocoa_GLES_UnloadLibrary(
_this);
81 if (Cocoa_GL_LoadLibrary(
_this,
NULL) != 0) {
85 return Cocoa_GL_CreateContext(
_this, window);
96 SDL_EGL_DeleteContext(
_this, context);
97 Cocoa_GLES_UnloadLibrary(
_this);
100 SDL_EGL_SwapWindow_impl(Cocoa)
101 SDL_EGL_MakeCurrent_impl(Cocoa)
114 SDL_EGL_UnloadLibrary(
_this);
120 NSView*
v = windowdata->
nswindow.contentView;
124 return SDL_SetError(
"Could not create GLES window surface");
127 return Cocoa_GLES_MakeCurrent(
_this, current_win, current_ctx);
int(* GL_SetSwapInterval)(_THIS, int interval)
static screen_context_t context
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLint GLint layer
int(* GL_LoadLibrary)(_THIS, const char *path)
#define EGL_DEFAULT_DISPLAY
static SDL_VideoDevice * _this
void * SDL_GLContext
An opaque handle to an OpenGL context.
SDL_GLContext(* GL_CreateContext)(_THIS, SDL_Window *window)
int(* GL_MakeCurrent)(_THIS, SDL_Window *window, SDL_GLContext context)
#define SDL_VIDEO_OPENGL_CGL
void(* GL_UnloadLibrary)(_THIS)
#define SDL_GL_GetCurrentContext
#define SDL_GL_GetCurrentWindow
EGLSurface EGLNativeWindowType * window
int(* GL_SwapWindow)(_THIS, SDL_Window *window)
The type used to identify a window.
GLsizei const GLchar *const * path
struct SDL_VideoDevice::@34 gl_config
void(* GL_DeleteContext)(_THIS, SDL_GLContext context)
int(* GL_GetSwapInterval)(_THIS)
void *(* GL_GetProcAddress)(_THIS, const char *proc)