slouken@2737
|
1 |
/*
|
slouken@5535
|
2 |
Simple DirectMedia Layer
|
slouken@6885
|
3 |
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
slouken@2737
|
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@2737
|
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@2737
|
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@2737
|
20 |
*/
|
slouken@5199
|
21 |
|
slouken@2737
|
22 |
|
slouken@2737
|
23 |
#ifndef _SDL_directfb_opengl_h
|
slouken@2737
|
24 |
#define _SDL_directfb_opengl_h
|
slouken@2737
|
25 |
|
slouken@5199
|
26 |
#include "SDL_DirectFB_video.h"
|
slouken@5199
|
27 |
|
slouken@2737
|
28 |
#if SDL_DIRECTFB_OPENGL
|
slouken@5199
|
29 |
|
slouken@2737
|
30 |
#include "SDL_opengl.h"
|
slouken@2737
|
31 |
|
slouken@2737
|
32 |
typedef struct _DirectFB_GLContext DirectFB_GLContext;
|
slouken@2737
|
33 |
struct _DirectFB_GLContext
|
slouken@2737
|
34 |
{
|
slouken@5199
|
35 |
IDirectFBGL *context;
|
slouken@5199
|
36 |
DirectFB_GLContext *next;
|
slouken@4636
|
37 |
|
slouken@5199
|
38 |
SDL_Window *sdl_window;
|
slouken@5199
|
39 |
int is_locked;
|
slouken@2737
|
40 |
};
|
slouken@2737
|
41 |
|
slouken@2737
|
42 |
/* OpenGL functions */
|
slouken@2737
|
43 |
extern int DirectFB_GL_Initialize(_THIS);
|
slouken@2737
|
44 |
extern void DirectFB_GL_Shutdown(_THIS);
|
slouken@2737
|
45 |
|
slouken@2737
|
46 |
extern int DirectFB_GL_LoadLibrary(_THIS, const char *path);
|
slouken@2737
|
47 |
extern void *DirectFB_GL_GetProcAddress(_THIS, const char *proc);
|
slouken@2737
|
48 |
extern SDL_GLContext DirectFB_GL_CreateContext(_THIS, SDL_Window * window);
|
slouken@2737
|
49 |
extern int DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window,
|
slouken@2737
|
50 |
SDL_GLContext context);
|
slouken@2737
|
51 |
extern int DirectFB_GL_SetSwapInterval(_THIS, int interval);
|
slouken@2737
|
52 |
extern int DirectFB_GL_GetSwapInterval(_THIS);
|
slouken@2737
|
53 |
extern void DirectFB_GL_SwapWindow(_THIS, SDL_Window * window);
|
slouken@2737
|
54 |
extern void DirectFB_GL_DeleteContext(_THIS, SDL_GLContext context);
|
slouken@2737
|
55 |
|
slouken@4636
|
56 |
extern void DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window);
|
slouken@4636
|
57 |
extern void DirectFB_GL_ReAllocWindowContexts(_THIS, SDL_Window * window);
|
slouken@4636
|
58 |
extern void DirectFB_GL_DestroyWindowContexts(_THIS, SDL_Window * window);
|
slouken@4636
|
59 |
|
slouken@2737
|
60 |
#endif /* SDL_DIRECTFB_OPENGL */
|
slouken@2737
|
61 |
|
slouken@2737
|
62 |
#endif /* _SDL_directfb_opengl_h */
|
slouken@2737
|
63 |
|
slouken@2737
|
64 |
/* vi: set ts=4 sw=4 expandtab: */
|