src/video/windows/SDL_windowsopengles.c
author Gabriel Jacobo <gabomdq@gmail.com>
Fri, 22 Nov 2013 13:24:53 -0300
changeset 8021 f96e12e0ade9
child 8026 27a998fdc771
permissions -rw-r--r--
OpenGL ES support for Windows
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8021
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     1
/*
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     2
Simple DirectMedia Layer
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     3
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     4
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     5
This software is provided 'as-is', without any express or implied
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     6
warranty.  In no event will the authors be held liable for any damages
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     7
arising from the use of this software.
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     8
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
     9
Permission is granted to anyone to use this software for any purpose,
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    10
including commercial applications, and to alter it and redistribute it
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    11
freely, subject to the following restrictions:
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    12
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    13
1. The origin of this software must not be misrepresented; you must not
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    14
claim that you wrote the original software. If you use this software
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    15
in a product, an acknowledgment in the product documentation would be
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    16
appreciated but is not required.
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    17
2. Altered source versions must be plainly marked as such, and must not be
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    18
misrepresented as being the original software.
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    19
3. This notice may not be removed or altered from any source distribution.
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    20
*/
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    21
#include "SDL_config.h"
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    22
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    23
#if SDL_VIDEO_DRIVER_WINDOWS && SDL_VIDEO_OPENGL_EGL
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    24
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    25
#include "SDL_windowsvideo.h"
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    26
#include "SDL_windowsopengles.h"
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    27
#include "SDL_windowsopengl.h"
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    28
#include "SDL_log.h"
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    29
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    30
/* EGL implementation of SDL OpenGL support */
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    31
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    32
int
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    33
WIN_GLES_LoadLibrary(_THIS, const char *path) {
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    34
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    35
    SDL_VideoData *data = (SDL_VideoData *)_this->driverdata;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    36
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    37
    /* If the profile requested is not GL ES, switch over to WIN_GL functions  */
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    38
    if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) {
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    39
#if SDL_VIDEO_OPENGL_WGL
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    40
        WIN_GLES_UnloadLibrary(_this);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    41
        _this->GL_LoadLibrary = WIN_GL_LoadLibrary;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    42
        _this->GL_GetProcAddress = WIN_GL_GetProcAddress;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    43
        _this->GL_UnloadLibrary = WIN_GL_UnloadLibrary;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    44
        _this->GL_CreateContext = WIN_GL_CreateContext;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    45
        _this->GL_MakeCurrent = WIN_GL_MakeCurrent;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    46
        _this->GL_SetSwapInterval = WIN_GL_SetSwapInterval;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    47
        _this->GL_GetSwapInterval = WIN_GL_GetSwapInterval;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    48
        _this->GL_SwapWindow = WIN_GL_SwapWindow;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    49
        _this->GL_DeleteContext = WIN_GL_DeleteContext;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    50
        return WIN_GL_LoadLibrary(_this, path);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    51
#else
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    52
        return SDL_SetError("SDL not configured with OpenGL/WGL support");
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    53
#endif
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    54
    }
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    55
    
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    56
    if (_this->egl_data == NULL) {
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    57
        return SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    58
    }
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    59
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    60
    return 0;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    61
}
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    62
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    63
SDL_GLContext
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    64
WIN_GLES_CreateContext(_THIS, SDL_Window * window)
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    65
{
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    66
    SDL_GLContext context;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    67
    SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    68
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    69
    if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) {
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    70
        /* Switch to WGL based functions */
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    71
        WIN_GLES_UnloadLibrary(_this);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    72
        _this->GL_LoadLibrary = WIN_GL_LoadLibrary;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    73
        _this->GL_GetProcAddress = WIN_GL_GetProcAddress;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    74
        _this->GL_UnloadLibrary = WIN_GL_UnloadLibrary;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    75
        _this->GL_CreateContext = WIN_GL_CreateContext;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    76
        _this->GL_MakeCurrent = WIN_GL_MakeCurrent;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    77
        _this->GL_SetSwapInterval = WIN_GL_SetSwapInterval;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    78
        _this->GL_GetSwapInterval = WIN_GL_GetSwapInterval;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    79
        _this->GL_SwapWindow = WIN_GL_SwapWindow;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    80
        _this->GL_DeleteContext = WIN_GL_DeleteContext;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    81
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    82
        if (WIN_GL_LoadLibrary(_this, NULL) != 0) {
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    83
            return NULL;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    84
        }
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    85
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    86
        return WIN_GL_CreateContext(_this, window);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    87
    }
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    88
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    89
    context = SDL_EGL_CreateContext(_this, data->egl_surface);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    90
    return context;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    91
}
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    92
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    93
void
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    94
WIN_GLES_DeleteContext(_THIS, SDL_GLContext context)
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    95
{
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    96
    SDL_EGL_DeleteContext(_this, context);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    97
    WIN_GLES_UnloadLibrary(_this);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    98
}
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
    99
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   100
SDL_EGL_SwapWindow_impl(WIN)
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   101
SDL_EGL_MakeCurrent_impl(WIN)
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   102
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   103
int
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   104
WIN_GLES_SetupWindow(_THIS, SDL_Window * window)
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   105
{
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   106
    /* The current context is lost in here; save it and reset it. */
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   107
    SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   108
    SDL_Window *current_win = SDL_GL_GetCurrentWindow();
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   109
    SDL_GLContext current_ctx = SDL_GL_GetCurrentContext();
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   110
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   111
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   112
    if (_this->egl_data == NULL) {
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   113
        if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY) < 0) {
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   114
            return -1;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   115
        }
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   116
    }
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   117
  
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   118
    /* Create the GLES window surface */
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   119
    windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType)windowdata->hwnd);
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   120
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   121
    if (windowdata->egl_surface == EGL_NO_SURFACE) {
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   122
        return SDL_SetError("Could not create GLES window surface");
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   123
    }
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   124
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   125
    return WIN_GLES_MakeCurrent(_this, current_win, current_ctx);    
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   126
}
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   127
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   128
int
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   129
WIN_GLES_SetSwapInterval(_THIS, int interval)
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   130
{
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   131
    /* FIXME: This should call SDL_EGL_SetSwapInterval, but ANGLE has a bug that prevents this
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   132
     * from working if we do (the window contents freeze and don't swap properly). So, we ignore
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   133
     * the request for now.
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   134
     */
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   135
    SDL_Log("WARNING: Ignoring SDL_GL_SetSwapInterval call due to ANGLE bug");
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   136
    return 0;
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   137
}
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   138
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   139
#endif /* SDL_VIDEO_DRIVER_WINDOWS && SDL_VIDEO_OPENGL_EGL */
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   140
f96e12e0ade9 OpenGL ES support for Windows
Gabriel Jacobo <gabomdq@gmail.com>
parents:
diff changeset
   141
/* vi: set ts=4 sw=4 expandtab: */