src/video/x11/SDL_x11opengles.h
author Gabriel Jacobo <gabomdq@gmail.com>
Mon, 19 Aug 2013 16:29:46 -0300
changeset 7659 ac4ce59c40e7
parent 6885 700f1b25f77f
child 7986 ffb7bf531644
permissions -rw-r--r--
Fixes bug #2037, common EGL code for Android and X11
slouken@3190
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@6885
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
slouken@3190
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@3190
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@3190
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@3190
    20
*/
slouken@6370
    21
#include "SDL_config.h"
slouken@3190
    22
slouken@6370
    23
#ifndef _SDL_x11opengles_h
slouken@6370
    24
#define _SDL_x11opengles_h
slouken@6370
    25
gabomdq@7659
    26
#if SDL_VIDEO_OPENGL_EGL
slouken@3190
    27
slouken@3190
    28
#include "../SDL_sysvideo.h"
gabomdq@7659
    29
#include "../SDL_egl.h"
slouken@3190
    30
slouken@3190
    31
typedef struct SDL_PrivateGLESData
slouken@3190
    32
{
slouken@3190
    33
} SDL_PrivateGLESData;
slouken@3190
    34
slouken@3190
    35
/* OpenGLES functions */
gabomdq@7659
    36
#define X11_GLES_GetAttribute SDL_EGL_GetAttribute
gabomdq@7659
    37
#define X11_GLES_GetProcAddress SDL_EGL_GetProcAddress
gabomdq@7659
    38
#define X11_GLES_UnloadLibrary SDL_EGL_UnloadLibrary
gabomdq@7659
    39
#define X11_GLES_SetSwapInterval SDL_EGL_SetSwapInterval
gabomdq@7659
    40
#define X11_GLES_GetSwapInterval SDL_EGL_GetSwapInterval
gabomdq@7659
    41
#define X11_GLES_DeleteContext SDL_EGL_DeleteContext
gabomdq@7659
    42
gabomdq@7659
    43
extern int X11_GLES_LoadLibrary(_THIS, const char *path);
gabomdq@7659
    44
extern XVisualInfo *X11_GLES_GetVisual(_THIS, Display * display, int screen);
slouken@3190
    45
extern SDL_GLContext X11_GLES_CreateContext(_THIS, SDL_Window * window);
gabomdq@7659
    46
extern void X11_GLES_SwapWindow(_THIS, SDL_Window * window);
gabomdq@7659
    47
extern int X11_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
slouken@3190
    48
gabomdq@7659
    49
#endif /* SDL_VIDEO_OPENGL_EGL */
slouken@6370
    50
slouken@6370
    51
#endif /* _SDL_x11opengles_h */
slouken@6370
    52
slouken@6370
    53
/* vi: set ts=4 sw=4 expandtab: */