src/video/mir/SDL_miropengl.c
changeset 12391 ca6e41ade79a
parent 12390 60f322c5984f
child 12392 046dcbdbaa74
     1.1 --- a/src/video/mir/SDL_miropengl.c	Fri Nov 02 18:07:11 2018 -0700
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,78 +0,0 @@
     1.4 -/*
     1.5 -  Simple DirectMedia Layer
     1.6 -  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
     1.7 -
     1.8 -  This software is provided 'as-is', without any express or implied
     1.9 -  warranty.  In no event will the authors be held liable for any damages
    1.10 -  arising from the use of this software.
    1.11 -
    1.12 -  Permission is granted to anyone to use this software for any purpose,
    1.13 -  including commercial applications, and to alter it and redistribute it
    1.14 -  freely, subject to the following restrictions:
    1.15 -
    1.16 -  1. The origin of this software must not be misrepresented; you must not
    1.17 -     claim that you wrote the original software. If you use this software
    1.18 -     in a product, an acknowledgment in the product documentation would be
    1.19 -     appreciated but is not required.
    1.20 -  2. Altered source versions must be plainly marked as such, and must not be
    1.21 -     misrepresented as being the original software.
    1.22 -  3. This notice may not be removed or altered from any source distribution.
    1.23 -*/
    1.24 -
    1.25 -/*
    1.26 -  Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
    1.27 -*/
    1.28 -
    1.29 -#include "../../SDL_internal.h"
    1.30 -
    1.31 -#if SDL_VIDEO_DRIVER_MIR
    1.32 -
    1.33 -#include "SDL_miropengl.h"
    1.34 -
    1.35 -#include "SDL_mirdyn.h"
    1.36 -
    1.37 -int
    1.38 -MIR_GL_SwapWindow(_THIS, SDL_Window* window)
    1.39 -{
    1.40 -    MIR_Window* mir_wind = window->driverdata;
    1.41 -
    1.42 -    return SDL_EGL_SwapBuffers(_this, mir_wind->egl_surface);
    1.43 -}
    1.44 -
    1.45 -int
    1.46 -MIR_GL_MakeCurrent(_THIS, SDL_Window* window, SDL_GLContext context)
    1.47 -{
    1.48 -  if (window) {
    1.49 -      EGLSurface egl_surface = ((MIR_Window*)window->driverdata)->egl_surface;
    1.50 -      return SDL_EGL_MakeCurrent(_this, egl_surface, context);
    1.51 -  }
    1.52 -
    1.53 -  return SDL_EGL_MakeCurrent(_this, NULL, NULL);
    1.54 -}
    1.55 -
    1.56 -SDL_GLContext
    1.57 -MIR_GL_CreateContext(_THIS, SDL_Window* window)
    1.58 -{
    1.59 -    MIR_Window* mir_window = window->driverdata;
    1.60 -
    1.61 -    SDL_GLContext context;
    1.62 -    context = SDL_EGL_CreateContext(_this, mir_window->egl_surface);
    1.63 -
    1.64 -    return context;
    1.65 -}
    1.66 -
    1.67 -int
    1.68 -MIR_GL_LoadLibrary(_THIS, const char* path)
    1.69 -{
    1.70 -    MIR_Data* mir_data = _this->driverdata;
    1.71 -
    1.72 -    SDL_EGL_LoadLibrary(_this, path, MIR_mir_connection_get_egl_native_display(mir_data->connection), 0);
    1.73 -
    1.74 -    SDL_EGL_ChooseConfig(_this);
    1.75 -
    1.76 -    return 0;
    1.77 -}
    1.78 -
    1.79 -#endif /* SDL_VIDEO_DRIVER_MIR */
    1.80 -
    1.81 -/* vi: set ts=4 sw=4 expandtab: */