src/video/x11/SDL_x11opengl.h
changeset 1952 420716272158
child 1953 214880ed48c3
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/x11/SDL_x11opengl.h	Fri Jul 28 08:43:17 2006 +0000
     1.3 @@ -0,0 +1,79 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997-2006 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Lesser General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2.1 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Lesser General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Lesser General Public
    1.19 +    License along with this library; if not, write to the Free Software
    1.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +#include "SDL_config.h"
    1.26 +
    1.27 +#ifndef _SDL_x11opengl_h
    1.28 +#define _SDL_x11opengl_h
    1.29 +
    1.30 +#if SDL_VIDEO_OPENGL_GLX
    1.31 +#include "SDL_opengl.h"
    1.32 +#include <GL/glx.h>
    1.33 +
    1.34 +struct SDL_GLDriverData
    1.35 +{
    1.36 +    int initialized;
    1.37 +    SDL_bool HAS_GLX_EXT_visual_rating;
    1.38 +
    1.39 +    void *(*glXGetProcAddress) (const GLubyte * procName);
    1.40 +
    1.41 +    XVisualInfo *(*glXChooseVisual)
    1.42 +      (Display * dpy, int screen, int *attribList);
    1.43 +
    1.44 +      GLXContext(*glXCreateContext)
    1.45 +      (Display * dpy, XVisualInfo * vis, GLXContext shareList, Bool direct);
    1.46 +
    1.47 +    void (*glXDestroyContext)
    1.48 +      (Display * dpy, GLXContext ctx);
    1.49 +
    1.50 +      Bool(*glXMakeCurrent)
    1.51 +      (Display * dpy, GLXDrawable drawable, GLXContext ctx);
    1.52 +
    1.53 +    void (*glXSwapBuffers)
    1.54 +      (Display * dpy, GLXDrawable drawable);
    1.55 +
    1.56 +    int (*glXGetConfig)
    1.57 +      (Display * dpy, XVisualInfo * visual_info, int attrib, int *value);
    1.58 +
    1.59 +    int (*glXSwapIntervalSGI) (int interval);
    1.60 +      GLint(*glXSwapIntervalMESA) (unsigned interval);
    1.61 +      GLint(*glXGetSwapIntervalMESA) (void);
    1.62 +};
    1.63 +
    1.64 +/* OpenGL functions */
    1.65 +extern int X11_GL_LoadLibrary(_THIS, const char *path);
    1.66 +extern void *X11_GL_GetProcAddress(_THIS, const char *proc);
    1.67 +extern int X11_GL_Initialize(_THIS);
    1.68 +extern void X11_GL_Shutdown(_THIS);
    1.69 +extern XVisualInfo *X11_GL_GetVisual(_THIS, Display * display, int screen);
    1.70 +extern SDL_GLContext X11_GL_CreateContext(_THIS, SDL_Window * window);
    1.71 +extern int X11_GL_MakeCurrent(_THIS, SDL_Window * window,
    1.72 +                              SDL_GLContext context);
    1.73 +extern int X11_GL_SetSwapInterval(_THIS, int interval);
    1.74 +extern int X11_GL_GetSwapInterval(_THIS);
    1.75 +extern void X11_GL_SwapWindow(_THIS, SDL_Window * window);
    1.76 +extern void X11_GL_DeleteContext(_THIS, SDL_GLContext context);
    1.77 +
    1.78 +#endif /* SDL_VIDEO_OPENGL_GLX */
    1.79 +
    1.80 +#endif /* _SDL_x11opengl_h */
    1.81 +
    1.82 +/* vi: set ts=4 sw=4 expandtab: */