src/video/psp/SDL_pspgl_c.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.
kimonline@7009
     1
/*
kimonline@7009
     2
  Simple DirectMedia Layer
slouken@9998
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
kimonline@7009
     4
kimonline@7009
     5
  This software is provided 'as-is', without any express or implied
kimonline@7009
     6
  warranty.  In no event will the authors be held liable for any damages
kimonline@7009
     7
  arising from the use of this software.
kimonline@7009
     8
kimonline@7009
     9
  Permission is granted to anyone to use this software for any purpose,
kimonline@7009
    10
  including commercial applications, and to alter it and redistribute it
kimonline@7009
    11
  freely, subject to the following restrictions:
kimonline@7009
    12
kimonline@7009
    13
  1. The origin of this software must not be misrepresented; you must not
kimonline@7009
    14
     claim that you wrote the original software. If you use this software
kimonline@7009
    15
     in a product, an acknowledgment in the product documentation would be
kimonline@7009
    16
     appreciated but is not required.
kimonline@7009
    17
  2. Altered source versions must be plainly marked as such, and must not be
kimonline@7009
    18
     misrepresented as being the original software.
kimonline@7009
    19
  3. This notice may not be removed or altered from any source distribution.
kimonline@7009
    20
*/
kimonline@7009
    21
kimonline@7009
    22
#ifndef _SDL_pspgl_c_h
kimonline@7009
    23
#define _SDL_pspgl_c_h
kimonline@7009
    24
kimonline@7009
    25
kimonline@7009
    26
#include <GLES/egl.h>
kimonline@7009
    27
#include <GLES/gl.h>
kimonline@7009
    28
kimonline@7009
    29
#include "SDL_pspvideo.h"
kimonline@7009
    30
kimonline@7009
    31
kimonline@7009
    32
typedef struct SDL_GLDriverData {
slouken@7191
    33
        EGLDisplay display;
slouken@7191
    34
        EGLContext context;
slouken@7191
    35
        EGLSurface surface;
kimonline@7009
    36
    uint32_t swapinterval;
kimonline@7009
    37
}SDL_GLDriverData;
kimonline@7009
    38
kimonline@7009
    39
extern void * PSP_GL_GetProcAddress(_THIS, const char *proc);
kimonline@7009
    40
extern int PSP_GL_MakeCurrent(_THIS,SDL_Window * window, SDL_GLContext context);
kimonline@7009
    41
extern void PSP_GL_SwapBuffers(_THIS);
kimonline@7009
    42
slouken@10690
    43
extern int PSP_GL_SwapWindow(_THIS, SDL_Window * window);
kimonline@7009
    44
extern SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window * window);
kimonline@7009
    45
kimonline@7009
    46
extern int PSP_GL_LoadLibrary(_THIS, const char *path);
kimonline@7009
    47
extern void PSP_GL_UnloadLibrary(_THIS);
kimonline@7009
    48
extern int PSP_GL_SetSwapInterval(_THIS, int interval);
kimonline@7009
    49
extern int PSP_GL_GetSwapInterval(_THIS);
kimonline@7009
    50
kimonline@7009
    51
kimonline@7009
    52
#endif /* _SDL_pspgl_c_h */