src/video/mir/SDL_miropengl.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 09 Dec 2016 01:47:43 -0800
changeset 10690 23a825f341e6
parent 9998 f67cf37e9cd4
child 10737 3406a0f8b041
permissions -rw-r--r--
Fixed bug 3513 - SDL_GL_SwapWindow does not return error status

Return an error code from SDL_GL_SwapWindow(), like the other SDL APIs.
icculus@8153
     1
/*
icculus@8153
     2
  Simple DirectMedia Layer
slouken@9998
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
icculus@8153
     4
icculus@8153
     5
  This software is provided 'as-is', without any express or implied
icculus@8153
     6
  warranty.  In no event will the authors be held liable for any damages
icculus@8153
     7
  arising from the use of this software.
icculus@8153
     8
icculus@8153
     9
  Permission is granted to anyone to use this software for any purpose,
icculus@8153
    10
  including commercial applications, and to alter it and redistribute it
icculus@8153
    11
  freely, subject to the following restrictions:
icculus@8153
    12
icculus@8153
    13
  1. The origin of this software must not be misrepresented; you must not
icculus@8153
    14
     claim that you wrote the original software. If you use this software
icculus@8153
    15
     in a product, an acknowledgment in the product documentation would be
icculus@8153
    16
     appreciated but is not required.
icculus@8153
    17
  2. Altered source versions must be plainly marked as such, and must not be
icculus@8153
    18
     misrepresented as being the original software.
icculus@8153
    19
  3. This notice may not be removed or altered from any source distribution.
icculus@8153
    20
*/
icculus@8153
    21
icculus@8153
    22
/*
icculus@8153
    23
  Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
icculus@8153
    24
*/
icculus@8153
    25
icculus@8153
    26
#ifndef _SDL_miropengl_h
icculus@8153
    27
#define _SDL_miropengl_h
icculus@8153
    28
icculus@8153
    29
#include "SDL_mirwindow.h"
icculus@8153
    30
icculus@8153
    31
#include "../SDL_egl_c.h"
icculus@8153
    32
icculus@8153
    33
#define MIR_GL_DeleteContext   SDL_EGL_DeleteContext
icculus@8153
    34
#define MIR_GL_GetSwapInterval SDL_EGL_GetSwapInterval
icculus@8153
    35
#define MIR_GL_SetSwapInterval SDL_EGL_SetSwapInterval
icculus@8153
    36
slouken@10690
    37
extern int
icculus@8153
    38
MIR_GL_SwapWindow(_THIS, SDL_Window* window);
icculus@8153
    39
icculus@8153
    40
extern int
icculus@8153
    41
MIR_GL_MakeCurrent(_THIS, SDL_Window* window, SDL_GLContext context);
icculus@8153
    42
icculus@8153
    43
extern SDL_GLContext
icculus@8153
    44
MIR_GL_CreateContext(_THIS, SDL_Window* window);
icculus@8153
    45
icculus@8153
    46
extern int
icculus@8153
    47
MIR_GL_LoadLibrary(_THIS, const char* path);
icculus@8153
    48
icculus@8153
    49
extern void
icculus@8153
    50
MIR_GL_UnloadLibrary(_THIS);
icculus@8153
    51
icculus@8153
    52
extern void*
icculus@8153
    53
MIR_GL_GetProcAddress(_THIS, const char* proc);
icculus@8153
    54
icculus@8153
    55
#endif /* _SDL_miropengl_h */
icculus@8154
    56
icculus@8154
    57
/* vi: set ts=4 sw=4 expandtab: */
icculus@8154
    58