src/video/winrt/SDL_winrtopengles.cpp
author Sam Lantinga <slouken@libsdl.org>
Thu, 13 Mar 2014 00:40:08 -0700
changeset 8615 097646deaef2
parent 8609 d59f0f12bf07
child 8663 308e74493106
permissions -rw-r--r--
Fixed the copyright date on files contributed by David Ludwig
slouken@8582
     1
/*
slouken@8582
     2
  Simple DirectMedia Layer
slouken@8615
     3
  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
slouken@8582
     4
slouken@8582
     5
  This software is provided 'as-is', without any express or implied
slouken@8582
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@8582
     7
  arising from the use of this software.
slouken@8582
     8
slouken@8582
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@8582
    10
  including commercial applications, and to alter it and redistribute it
slouken@8582
    11
  freely, subject to the following restrictions:
slouken@8582
    12
slouken@8582
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@8582
    14
     claim that you wrote the original software. If you use this software
slouken@8582
    15
     in a product, an acknowledgment in the product documentation would be
slouken@8582
    16
     appreciated but is not required.
slouken@8582
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@8582
    18
     misrepresented as being the original software.
slouken@8582
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@8582
    20
*/
slouken@8609
    21
#include "../../SDL_internal.h"
slouken@8582
    22
slouken@8582
    23
// TODO: WinRT, make this file compile via C code
slouken@8582
    24
slouken@8582
    25
#if SDL_VIDEO_DRIVER_WINRT && SDL_VIDEO_OPENGL_EGL
slouken@8582
    26
slouken@8582
    27
/* EGL implementation of SDL OpenGL support */
slouken@8582
    28
slouken@8582
    29
#include "SDL_winrtvideo_cpp.h"
slouken@8582
    30
extern "C" {
slouken@8582
    31
#include "SDL_winrtopengles.h"
slouken@8582
    32
}
slouken@8582
    33
slouken@8582
    34
#define EGL_D3D11_ONLY_DISPLAY_ANGLE ((NativeDisplayType) -3)
slouken@8582
    35
slouken@8582
    36
extern "C" int
slouken@8582
    37
WINRT_GLES_LoadLibrary(_THIS, const char *path) {
slouken@8582
    38
    return SDL_EGL_LoadLibrary(_this, path, EGL_D3D11_ONLY_DISPLAY_ANGLE);
slouken@8582
    39
}
slouken@8582
    40
slouken@8582
    41
extern "C" {
slouken@8582
    42
SDL_EGL_CreateContext_impl(WINRT)
slouken@8582
    43
SDL_EGL_SwapWindow_impl(WINRT)
slouken@8582
    44
SDL_EGL_MakeCurrent_impl(WINRT)
slouken@8582
    45
}
slouken@8582
    46
slouken@8582
    47
#endif /* SDL_VIDEO_DRIVER_WINRT && SDL_VIDEO_OPENGL_EGL */
slouken@8582
    48
slouken@8582
    49
/* vi: set ts=4 sw=4 expandtab: */
slouken@8582
    50