Engine/lib/sdl/src/video/windows/SDL_windowsopengles.c
/* EGL implementation of SDL OpenGL support */
EGL implementation of SDL OpenGL support
EGL implementation of SDL OpenGL support
int
WIN_GLES_LoadLibrary(_THIS, const char *path) {
    if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) {
#if SDL_VIDEO_OPENGL_WGL
        WIN_GLES_UnloadLibrary(_this);
        _this->GL_LoadLibrary = WIN_GL_LoadLibrary;
        _this->GL_GetProcAddress = WIN_GL_GetProcAddress;
        _this->GL_UnloadLibrary = WIN_GL_UnloadLibrary;
        _this->GL_CreateContext = WIN_GL_CreateContext;
        _this->GL_MakeCurrent = WIN_GL_MakeCurrent;
        _this->GL_SetSwapInterval = WIN_GL_SetSwapInterval;
        _this->GL_GetSwapInterval = WIN_GL_GetSwapInterval;
        _this->GL_SwapWindow = WIN_GL_SwapWindow;
        _this->GL_DeleteContext = WIN_GL_DeleteContext;
        return WIN_GL_LoadLibrary(_this, path);
#else
        return SDL_SetError("SDL not configured with OpenGL/WGL support");
#endif
    }
    if (_this->egl_data == NULL) {
        return SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY);
    }
    return 0;
}
int WIN_GLES_LoadLibrary ( _THIS , const char * path ) { if ( _this -> gl_config . profile_mask != SDL_GL_CONTEXT_PROFILE_ES ) { #if SDL_VIDEO_OPENGL_WGL WIN_GLES_UnloadLibrary ( _this ) ; _this -> GL_LoadLibrary = WIN_GL_LoadLibrary ; _this -> GL_GetProcAddress = WIN_GL_GetProcAddress ; _this -> GL_UnloadLibrary = WIN_GL_UnloadLibrary ; _this -> GL_CreateContext = WIN_GL_CreateContext ; _this -> GL_MakeCurrent = WIN_GL_MakeCurrent ; _this -> GL_SetSwapInterval = WIN_GL_SetSwapInterval ; _this -> GL_GetSwapInterval = WIN_GL_GetSwapInterval ; _this -> GL_SwapWindow = WIN_GL_SwapWindow ; _this -> GL_DeleteContext = WIN_GL_DeleteContext ; return WIN_GL_LoadLibrary ( _this , path ) ; #else return SDL_SetError ( " " ) ; #endif } if ( _this -> egl_data == NULL ) { return SDL_EGL_LoadLibrary ( _this , NULL , EGL_DEFAULT_DISPLAY ) ; } return 0 ; }
EGL implementation of SDL OpenGL support
EGL implementation of SDL OpenGL support
/* If the profile requested is not GL ES, switch over to WIN_GL functions  */