src/video/x11/SDL_x11opengles.h
author Ethan Lee <flibitijibibo@flibitijibibo.com>
Wed, 17 Jul 2019 23:20:57 -0400
changeset 12950 05dddfb66b85
parent 12503 806492103856
permissions -rw-r--r--
Copypaste SDL_NSLog to UIKit backend, document it as such
slouken@3190
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@12503
     3
  Copyright (C) 1997-2019 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
*/
icculus@8093
    21
#include "../../SDL_internal.h"
slouken@3190
    22
slouken@10638
    23
#ifndef SDL_x11opengles_h_
slouken@10638
    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@8021
    29
#include "../SDL_egl_c.h"
slouken@3190
    30
slouken@3190
    31
typedef struct SDL_PrivateGLESData
slouken@3190
    32
{
slouken@10616
    33
  /* 1401 If the struct-declaration-list contains no named members, the behavior is undefined. */
slouken@10616
    34
  /* warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat] */
slouken@10616
    35
  int dummy; 
slouken@3190
    36
} SDL_PrivateGLESData;
slouken@3190
    37
slouken@3190
    38
/* OpenGLES functions */
gabomdq@7659
    39
#define X11_GLES_GetAttribute SDL_EGL_GetAttribute
gabomdq@7659
    40
#define X11_GLES_GetProcAddress SDL_EGL_GetProcAddress
gabomdq@7659
    41
#define X11_GLES_UnloadLibrary SDL_EGL_UnloadLibrary
gabomdq@7659
    42
#define X11_GLES_SetSwapInterval SDL_EGL_SetSwapInterval
gabomdq@7659
    43
#define X11_GLES_GetSwapInterval SDL_EGL_GetSwapInterval
gabomdq@8018
    44
#define X11_GLES_DeleteContext SDL_EGL_DeleteContext
gabomdq@7659
    45
gabomdq@7659
    46
extern int X11_GLES_LoadLibrary(_THIS, const char *path);
gabomdq@7659
    47
extern XVisualInfo *X11_GLES_GetVisual(_THIS, Display * display, int screen);
slouken@3190
    48
extern SDL_GLContext X11_GLES_CreateContext(_THIS, SDL_Window * window);
slouken@10694
    49
extern int X11_GLES_SwapWindow(_THIS, SDL_Window * window);
gabomdq@7659
    50
extern int X11_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
slouken@3190
    51
gabomdq@7659
    52
#endif /* SDL_VIDEO_OPENGL_EGL */
slouken@6370
    53
slouken@10638
    54
#endif /* SDL_x11opengles_h_ */
slouken@6370
    55
slouken@6370
    56
/* vi: set ts=4 sw=4 expandtab: */