mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-14 18:23:49 +00:00
147 lines
5.5 KiB
C
147 lines
5.5 KiB
C
|
/*
|
||
|
** The OpenGL Extension Wrangler Library
|
||
|
** Copyright (C) 2003, 2002, Milan Ikits <milan.ikits@ieee.org>
|
||
|
** Copyright (C) 2003, 2002, Marcelo E. Magallon <mmagallo@debian.org>
|
||
|
** Copyright (C) 2002, Lev Povalahev <levp@gmx.net>
|
||
|
** All rights reserved.
|
||
|
**
|
||
|
** Redistribution and use in source and binary forms, with or without
|
||
|
** modification, are permitted provided that the following conditions are met:
|
||
|
**
|
||
|
** * Redistributions of source code must retain the above copyright notice,
|
||
|
** this list of conditions and the following disclaimer.
|
||
|
** * Redistributions in binary form must reproduce the above copyright notice,
|
||
|
** this list of conditions and the following disclaimer in the documentation
|
||
|
** and/or other materials provided with the distribution.
|
||
|
** * The name of the author may be used to endorse or promote products
|
||
|
** derived from this software without specific prior written permission.
|
||
|
**
|
||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||
|
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||
|
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||
|
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||
|
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||
|
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||
|
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||
|
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||
|
** THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
** The contents of this file are subject to the GLX Public License Version 1.0
|
||
|
** (the "License"). You may not use this file except in compliance with the
|
||
|
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||
|
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||
|
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||
|
**
|
||
|
** Software distributed under the License is distributed on an "AS IS"
|
||
|
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||
|
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||
|
** language governing rights and limitations under the License.
|
||
|
**
|
||
|
** The Original Software is GLX version 1.2 source code, released February,
|
||
|
** 1999. The developer of the Original Software is Silicon Graphics, Inc.
|
||
|
** Those portions of the Subject Software created by Silicon Graphics, Inc.
|
||
|
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
|
||
|
*/
|
||
|
|
||
|
#ifndef __glxew_h__
|
||
|
#define __glxew_h__
|
||
|
#define __GLXEW_H__
|
||
|
|
||
|
#ifdef __glxext_h_
|
||
|
#error glxext.h included before glxew.h
|
||
|
#endif
|
||
|
|
||
|
#define __glxext_h_
|
||
|
|
||
|
#ifndef _WIN32
|
||
|
|
||
|
#include <X11/Xlib.h>
|
||
|
#include <X11/Xutil.h>
|
||
|
#include <X11/Xmd.h>
|
||
|
#include <GL/glew.h>
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
/* ---------------------------- GLX_VERSION_1_0 --------------------------- */
|
||
|
|
||
|
#ifndef GLX_VERSION_1_0
|
||
|
#define GLX_VERSION_1_0 1
|
||
|
|
||
|
#define GLX_USE_GL 1
|
||
|
#define GLX_BUFFER_SIZE 2
|
||
|
#define GLX_LEVEL 3
|
||
|
#define GLX_RGBA 4
|
||
|
#define GLX_DOUBLEBUFFER 5
|
||
|
#define GLX_STEREO 6
|
||
|
#define GLX_AUX_BUFFERS 7
|
||
|
#define GLX_RED_SIZE 8
|
||
|
#define GLX_GREEN_SIZE 9
|
||
|
#define GLX_BLUE_SIZE 10
|
||
|
#define GLX_ALPHA_SIZE 11
|
||
|
#define GLX_DEPTH_SIZE 12
|
||
|
#define GLX_STENCIL_SIZE 13
|
||
|
#define GLX_ACCUM_RED_SIZE 14
|
||
|
#define GLX_ACCUM_GREEN_SIZE 15
|
||
|
#define GLX_ACCUM_BLUE_SIZE 16
|
||
|
#define GLX_ACCUM_ALPHA_SIZE 17
|
||
|
#define GLX_BAD_SCREEN 1
|
||
|
#define GLX_BAD_ATTRIBUTE 2
|
||
|
#define GLX_NO_EXTENSION 3
|
||
|
#define GLX_BAD_VISUAL 4
|
||
|
#define GLX_BAD_CONTEXT 5
|
||
|
#define GLX_BAD_VALUE 6
|
||
|
#define GLX_BAD_ENUM 7
|
||
|
|
||
|
typedef XID GLXDrawable;
|
||
|
typedef XID GLXPixmap;
|
||
|
typedef struct __GLXcontextRec *GLXContext;
|
||
|
|
||
|
extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
|
||
|
extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
|
||
|
extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
|
||
|
extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
|
||
|
extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
|
||
|
extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
|
||
|
extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
|
||
|
extern void glXDestroyContext (Display *dpy, GLXContext ctx);
|
||
|
extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
|
||
|
extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
|
||
|
extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
|
||
|
extern GLXContext glXGetCurrentContext (void);
|
||
|
extern GLXDrawable glXGetCurrentDrawable (void);
|
||
|
extern void glXWaitGL (void);
|
||
|
extern void glXWaitX (void);
|
||
|
extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
|
||
|
extern void glXUseXFont (Font font, int first, int count, int listBase);
|
||
|
|
||
|
GLEWAPI GLboolean GLXEW_VERSION_1_0;
|
||
|
#define glxew_VERSION_1_0 GLXEW_VERSION_1_0
|
||
|
|
||
|
#endif /* GLX_VERSION_1_0 */
|
||
|
|
||
|
/* ---------------------------- GLX_VERSION_1_1 --------------------------- */
|
||
|
|
||
|
#ifndef GLX_VERSION_1_1
|
||
|
#define GLX_VERSION_1_1
|
||
|
|
||
|
#define GLX_VENDOR 0x1
|
||
|
#define GLX_VERSION 0x2
|
||
|
#define GLX_EXTENSIONS 0x3
|
||
|
|
||
|
extern const char* glXQueryExtensionsString (Display *dpy, int screen);
|
||
|
extern const char* glXGetClientString (Display *dpy, int name);
|
||
|
extern const char* glXQueryServerString (Display *dpy, int screen, int name);
|
||
|
|
||
|
GLEWAPI GLboolean GLXEW_VERSION_1_1;
|
||
|
#define glxew_VERSION_1_1 GLXEW_VERSION_1_1
|
||
|
|
||
|
#endif /* GLX_VERSION_1_1 */
|
||
|
|