Eneboo - Documentación para desarrolladores
src/qt/src/opengl/qgl_x11_p.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qt/qgl_x11_p.h   3.3.8   edited Jan 11 14:38 $
00003 **
00004 ** Definitions needed for resolving GL/GLX symbols using dlopen()
00005 ** under X11.
00006 **
00007 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
00008 **
00009 ** This file is part of the OpenGL module of the Qt GUI Toolkit.
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 as published by the Free Software
00013 ** Foundation and appearing in the file LICENSE.GPL included in the
00014 ** packaging of this file.
00015 **
00016 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00017 ** licenses for Qt/Embedded may use this file in accordance with the
00018 ** Qt Embedded Commercial License Agreement provided with the Software.
00019 **
00020 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00021 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00022 **
00023 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00024 **   information about Qt Commercial License Agreements.
00025 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00026 **
00027 ** Contact info@trolltech.com if any conditions of this licensing are
00028 ** not clear to you.
00029 **
00030 **********************************************************************/
00031 
00032 #ifndef QGL_P_H
00033 #define QGL_P_H
00034 
00035 //
00036 //  W A R N I N G
00037 //  -------------
00038 //
00039 // This file is not part of the Qt API.  This header file may
00040 // change from version to version without notice, or even be
00041 // removed.
00042 //
00043 // We mean it.
00044 //
00045 //
00046 
00047 #ifdef QT_DLOPEN_OPENGL
00048 // resolve the GL symbols we use ourselves
00049 bool qt_resolve_gl_symbols(bool = TRUE);
00050 extern "C" {
00051 // GL symbols
00052 typedef void (*_glCallLists)( GLsizei n, GLenum type, const GLvoid *lists );
00053 typedef void (*_glClearColor)( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
00054 typedef void (*_glClearIndex)( GLfloat c );
00055 typedef void (*_glColor3ub)( GLubyte red, GLubyte green, GLubyte blue );
00056 typedef void (*_glDeleteLists)( GLuint list, GLsizei range );
00057 typedef void (*_glDrawBuffer)( GLenum mode );
00058 typedef void (*_glFlush)( void );
00059 typedef void (*_glIndexi)( GLint c );
00060 typedef void (*_glListBase)( GLuint base );
00061 typedef void (*_glLoadIdentity)( void );
00062 typedef void (*_glMatrixMode)( GLenum mode );
00063 typedef void (*_glOrtho)( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
00064 typedef void (*_glPopAttrib)( void );
00065 typedef void (*_glPopMatrix)( void );
00066 typedef void (*_glPushAttrib)( GLbitfield mask );
00067 typedef void (*_glPushMatrix)( void );
00068 typedef void (*_glRasterPos2i)( GLint x, GLint y );
00069 typedef void (*_glRasterPos3d)( GLdouble x, GLdouble y, GLdouble z );
00070 typedef void (*_glReadPixels)( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels );
00071 typedef void (*_glViewport)( GLint x, GLint y, GLsizei width, GLsizei height );
00072 typedef void (*_glPixelStorei)( GLenum pname, GLint param );
00073 typedef void (*_glBitmap)( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove,
00074                            const GLubyte *bitmap );
00075 typedef void (*_glDrawPixels)( GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels );
00076 typedef void (*_glNewList)( GLuint list, GLenum mode );
00077 typedef void (*_glGetFloatv)( GLenum pname, GLfloat *params );
00078 typedef void (*_glGetIntegerv)( GLenum pname, GLint *params );
00079 typedef void (*_glEndList)( void );
00080 
00081 
00082 // GLX symbols - should be in the GL lib as well
00083 typedef XVisualInfo* (*_glXChooseVisual)(Display *dpy, int screen, int *attribList);
00084 typedef GLXContext (*_glXCreateContext)(Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
00085 typedef GLXPixmap (*_glXCreateGLXPixmap)(Display *dpy, XVisualInfo *vis, Pixmap pixmap);
00086 typedef void (*_glXDestroyContext)(Display *dpy, GLXContext ctx);
00087 typedef void (*_glXDestroyGLXPixmap)(Display *dpy, GLXPixmap pix);
00088 typedef const char* (*_glXGetClientString)(Display *dpy, int name );
00089 typedef int (*_glXGetConfig)(Display *dpy, XVisualInfo *vis, int attrib, int *value);
00090 typedef Bool (*_glXIsDirect)(Display *dpy, GLXContext ctx);
00091 typedef Bool (*_glXMakeCurrent)(Display *dpy, GLXDrawable drawable, GLXContext ctx);
00092 typedef Bool (*_glXQueryExtension)(Display *dpy, int *errorBase, int *eventBase);
00093 typedef const char* (*_glXQueryExtensionsString)(Display *dpy, int screen);
00094 typedef const char* (*_glXQueryServerString)(Display *dpy, int screen, int name);
00095 typedef void (*_glXSwapBuffers)(Display *dpy, GLXDrawable drawable);
00096 typedef void (*_glXUseXFont)(Font font, int first, int count, int listBase);
00097 typedef void (*_glXWaitX)(void);
00098 
00099 extern _glCallLists qt_glCallLists;
00100 extern _glClearColor qt_glClearColor;
00101 extern _glClearIndex qt_glClearIndex;
00102 extern _glColor3ub qt_glColor3ub;
00103 extern _glDeleteLists qt_glDeleteLists;
00104 extern _glDrawBuffer qt_glDrawBuffer;
00105 extern _glFlush qt_glFlush;
00106 extern _glIndexi qt_glIndexi;
00107 extern _glListBase qt_glListBase;
00108 extern _glLoadIdentity qt_glLoadIdentity;
00109 extern _glMatrixMode qt_glMatrixMode;
00110 extern _glOrtho qt_glOrtho;
00111 extern _glPopAttrib qt_glPopAttrib;
00112 extern _glPopMatrix qt_glPopMatrix;
00113 extern _glPushAttrib qt_glPushAttrib;
00114 extern _glPushMatrix qt_glPushMatrix;
00115 extern _glRasterPos2i qt_glRasterPos2i;
00116 extern _glRasterPos3d qt_glRasterPos3d;
00117 extern _glReadPixels qt_glReadPixels;
00118 extern _glViewport qt_glViewport;
00119 extern _glPixelStorei qt_glPixelStorei;
00120 extern _glBitmap qt_glBitmap;
00121 extern _glDrawPixels qt_glDrawPixels;
00122 extern _glNewList qt_glNewList;
00123 extern _glGetFloatv qt_glGetFloatv;
00124 extern _glGetIntegerv qt_glGetIntegerv;
00125 extern _glEndList qt_glEndList;
00126 
00127 extern _glXChooseVisual qt_glXChooseVisual;
00128 extern _glXCreateContext qt_glXCreateContext;
00129 extern _glXCreateGLXPixmap qt_glXCreateGLXPixmap;
00130 extern _glXDestroyContext qt_glXDestroyContext;
00131 extern _glXDestroyGLXPixmap qt_glXDestroyGLXPixmap;
00132 extern _glXGetClientString qt_glXGetClientString;
00133 extern _glXGetConfig qt_glXGetConfig;
00134 extern _glXIsDirect qt_glXIsDirect;
00135 extern _glXMakeCurrent qt_glXMakeCurrent;
00136 extern _glXQueryExtension qt_glXQueryExtension;
00137 extern _glXQueryExtensionsString qt_glXQueryExtensionsString;
00138 extern _glXQueryServerString qt_glXQueryServerString;
00139 extern _glXSwapBuffers qt_glXSwapBuffers;
00140 extern _glXUseXFont qt_glXUseXFont;
00141 extern _glXWaitX qt_glXWaitX;
00142 }; // extern "C"
00143 
00144 #define glCallLists qt_glCallLists
00145 #define glClearColor qt_glClearColor
00146 #define glClearIndex qt_glClearIndex
00147 #define glColor3ub qt_glColor3ub
00148 #define glDeleteLists qt_glDeleteLists
00149 #define glDrawBuffer qt_glDrawBuffer
00150 #define glFlush qt_glFlush
00151 #define glIndexi qt_glIndexi
00152 #define glListBase qt_glListBase
00153 #define glLoadIdentity qt_glLoadIdentity
00154 #define glMatrixMode qt_glMatrixMode
00155 #define glOrtho qt_glOrtho
00156 #define glPopAttrib qt_glPopAttrib
00157 #define glPopMatrix qt_glPopMatrix
00158 #define glPushAttrib qt_glPushAttrib
00159 #define glPushMatrix qt_glPushMatrix
00160 #define glRasterPos2i qt_glRasterPos2i
00161 #define glRasterPos3d qt_glRasterPos3d
00162 #define glReadPixels qt_glReadPixels
00163 #define glViewport qt_glViewport
00164 #define glPixelStorei qt_glPixelStorei
00165 #define glBitmap qt_glBitmap
00166 #define glDrawPixels qt_glDrawPixels
00167 #define glNewList qt_glNewList
00168 #define glGetFloatv qt_glGetFloatv
00169 #define glGetIntegerv qt_glGetIntegerv
00170 #define glEndList qt_glEndList
00171 
00172 #define glXChooseVisual qt_glXChooseVisual
00173 #define glXCreateContext qt_glXCreateContext
00174 #define glXCreateGLXPixmap qt_glXCreateGLXPixmap
00175 #define glXDestroyContext qt_glXDestroyContext
00176 #define glXDestroyGLXPixmap qt_glXDestroyGLXPixmap
00177 #define glXGetClientString qt_glXGetClientString
00178 #define glXGetConfig qt_glXGetConfig
00179 #define glXIsDirect qt_glXIsDirect
00180 #define glXMakeCurrent qt_glXMakeCurrent
00181 #define glXQueryExtension qt_glXQueryExtension
00182 #define glXQueryExtensionsString qt_glXQueryExtensionsString
00183 #define glXQueryServerString qt_glXQueryServerString
00184 #define glXSwapBuffers qt_glXSwapBuffers
00185 #define glXUseXFont qt_glXUseXFont
00186 #define glXWaitX qt_glXWaitX
00187 
00188 #else
00189 inline bool qt_resolve_gl_symbols(bool = TRUE) { return TRUE; }
00190 #endif // QT_DLOPEN_OPENGL
00191 #endif // QGL_P_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'