[qfusion-cvs-commits] SF.net SVN: l33t: [797] trunk/qfusion/source
Brought to you by:
digiman
From: qfusion s. c. <l33...@li...> - 2007-12-05 23:15:11
|
Revision: 797 http://l33t.svn.sourceforge.net/l33t/?rev=797&view=rev Author: digiman Date: 2007-12-05 15:15:09 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Reorder functions in qgl.h so that wglGetProcAddress and glXGetProcAddressARB become available as early as possible Modified Paths: -------------- trunk/qfusion/source/linux/qgl_linux.c trunk/qfusion/source/ref_gl/qgl.h Modified: trunk/qfusion/source/linux/qgl_linux.c =================================================================== --- trunk/qfusion/source/linux/qgl_linux.c 2007-12-05 22:08:30 UTC (rev 796) +++ trunk/qfusion/source/linux/qgl_linux.c 2007-12-05 23:15:09 UTC (rev 797) @@ -132,7 +132,7 @@ Com_Printf( "Using %s for OpenGL...", dllname ); } -#define QGL_FUNC(type,name,params) (q##name) = ( void * )qglGetProcAddress( #name ); \ +#define QGL_FUNC(type,name,params) (q##name) = ( void * )qglGetProcAddress( (const GLubyte *)#name ); \ if( !(q##name) ) { Com_Printf( "QGL_Init: Failed to get address for %s\n", #name ); return qfalse; } #define QGL_EXT(type,name,params) (q##name) = NULL; #define QGL_WGL(type,name,params) Modified: trunk/qfusion/source/ref_gl/qgl.h =================================================================== --- trunk/qfusion/source/ref_gl/qgl.h 2007-12-05 22:08:30 UTC (rev 796) +++ trunk/qfusion/source/ref_gl/qgl.h 2007-12-05 23:15:09 UTC (rev 797) @@ -417,6 +417,28 @@ #endif /* GL_SGIS_generate_mipmap */ +// WGL Functions +QGL_WGL(PROC, wglGetProcAddress, (LPCSTR)); +QGL_WGL(int, wglChoosePixelFormat, (HDC, CONST PIXELFORMATDESCRIPTOR *)); +QGL_WGL(int, wglDescribePixelFormat, (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR)); +QGL_WGL(BOOL, wglSetPixelFormat, (HDC, int, CONST PIXELFORMATDESCRIPTOR *)); +QGL_WGL(BOOL, wglSwapBuffers, (HDC)); +QGL_WGL(HGLRC, wglCreateContext, (HDC)); +QGL_WGL(BOOL, wglDeleteContext, (HGLRC)); +QGL_WGL(BOOL, wglMakeCurrent, (HDC, HGLRC)); + +// GLX Functions +QGL_GLX(void *, glXGetProcAddressARB, (const GLubyte *procName)); +QGL_GLX(XVisualInfo *, glXChooseVisual, (Display *dpy, int screen, int *attribList)); +QGL_GLX(GLXContext, glXCreateContext, (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct)); +QGL_GLX(void, glXDestroyContext, (Display *dpy, GLXContext ctx)); +QGL_GLX(Bool, glXMakeCurrent, (Display *dpy, GLXDrawable drawable, GLXContext ctx)); +QGL_GLX(Bool, glXCopyContext, (Display *dpy, GLXContext src, GLXContext dst, GLuint mask)); +QGL_GLX(Bool, glXSwapBuffers, (Display *dpy, GLXDrawable drawable)); +QGL_GLX(Bool, glXQueryVersion, (Display *dpy, int *major, int *minor)); +QGL_GLX(const char *, glXQueryExtensionsString, (Display *dpy, int screen)); + +// GL Functions QGL_FUNC(void, glAlphaFunc, (GLenum func, GLclampf ref)); QGL_FUNC(void, glArrayElement, (GLint i)); QGL_FUNC(void, glBegin, (GLenum mode)); @@ -551,28 +573,7 @@ QGL_EXT(void, glSwapInterval, (int interval)); -// WGL Functions -QGL_WGL(int, wglChoosePixelFormat, (HDC, CONST PIXELFORMATDESCRIPTOR *)); -QGL_WGL(int, wglDescribePixelFormat, (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR)); -QGL_WGL(BOOL, wglSetPixelFormat, (HDC, int, CONST PIXELFORMATDESCRIPTOR *)); -QGL_WGL(BOOL, wglSwapBuffers, (HDC)); -QGL_WGL(HGLRC, wglCreateContext, (HDC)); -QGL_WGL(BOOL, wglDeleteContext, (HGLRC)); -QGL_WGL(BOOL, wglMakeCurrent, (HDC, HGLRC)); -QGL_WGL(PROC, wglGetProcAddress, (LPCSTR)); - // WGL_EXT Functions QGL_WGL_EXT(const char *, wglGetExtensionsStringEXT, (void)); QGL_WGL_EXT(BOOL, wglGetDeviceGammaRamp3DFX, (HDC, WORD *)); QGL_WGL_EXT(BOOL, wglSetDeviceGammaRamp3DFX, (HDC, WORD *)); - -// GLX Functions -QGL_GLX(XVisualInfo *, glXChooseVisual, (Display *dpy, int screen, int *attribList)); -QGL_GLX(GLXContext, glXCreateContext, (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct)); -QGL_GLX(void, glXDestroyContext, (Display *dpy, GLXContext ctx)); -QGL_GLX(Bool, glXMakeCurrent, (Display *dpy, GLXDrawable drawable, GLXContext ctx)); -QGL_GLX(Bool, glXCopyContext, (Display *dpy, GLXContext src, GLXContext dst, GLuint mask)); -QGL_GLX(Bool, glXSwapBuffers, (Display *dpy, GLXDrawable drawable)); -QGL_GLX(void *, glXGetProcAddressARB, (const GLubyte *procName)); -QGL_GLX(Bool, glXQueryVersion, (Display *dpy, int *major, int *minor)); -QGL_GLX(const char *, glXQueryExtensionsString, (Display *dpy, int screen)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |