21 #include "../../SDL_internal.h"
23 #if SDL_VIDEO_DRIVER_DIRECTFB
27 #if SDL_DIRECTFB_OPENGL
32 #include <directfbgl.h>
36 #if SDL_DIRECTFB_OPENGL
42 DirectFB_GLContext *firstgl;
49 #define OPENGL_REQUIRS_DLOPEN
50 #if defined(OPENGL_REQUIRS_DLOPEN) && defined(SDL_LOADSO_DLOPEN)
52 #define GL_LoadObject(X) dlopen(X, (RTLD_NOW|RTLD_GLOBAL))
53 #define GL_LoadFunction dlsym
54 #define GL_UnloadObject dlclose
56 #define GL_LoadObject SDL_LoadObject
57 #define GL_LoadFunction SDL_LoadFunction
58 #define GL_UnloadObject SDL_UnloadObject
61 static void DirectFB_GL_UnloadLibrary(
_THIS);
64 DirectFB_GL_Initialize(
_THIS)
82 if (DirectFB_GL_LoadLibrary(
_this,
NULL) < 0) {
95 DirectFB_GL_Shutdown(
_THIS)
101 DirectFB_GL_UnloadLibrary(
_this);
108 DirectFB_GL_LoadLibrary(
_THIS,
const char *
path)
150 DirectFB_GL_UnloadLibrary(
_THIS)
155 SDL_DFB_ERR(
"Error #%d trying to unload library.\n", ret);
164 DirectFB_GL_GetProcAddress(
_THIS,
const char *proc)
169 return GL_LoadFunction(
handle, proc);
208 DirectFB_GLContext *
ctx = (DirectFB_GLContext *)
context;
209 DirectFB_GLContext *
p;
231 DirectFB_GL_SetSwapInterval(
_THIS,
int interval)
237 DirectFB_GL_GetSwapInterval(
_THIS)
246 DirectFB_GLContext *
p;
249 if (devdata->glFinish)
251 else if (devdata->glFlush)
256 if (
p->sdl_window ==
window &&
p->is_locked)
262 SDL_DFB_CHECKERR(windata->window_surface->Flip(windata->window_surface,
NULL, DSFLIP_PIPELINE |DSFLIP_BLIT | DSFLIP_ONSYNC ));
271 DirectFB_GLContext *
ctx = (DirectFB_GLContext *)
context;
272 DirectFB_GLContext *
p;
291 DirectFB_GLContext *
p;
305 DirectFB_GLContext *
p;
321 DirectFB_GLContext *
p;
325 DirectFB_GL_DeleteContext(
_this,
p);