diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-09-02 17:07:00 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-09-02 17:07:00 +0000 |
commit | 712e5042de57bb49f5f5c804c56d5015b171a557 (patch) | |
tree | e67d625d1eba1cabbe8380988b6f54475474dc64 /src/glut | |
parent | 93cfdfe1ef6f184a2e1687367fe4836185ecaa66 (diff) |
fix some strict aliasing problems related to choosing framebuffer configs (Matthias Hopf)
Diffstat (limited to 'src/glut')
-rw-r--r-- | src/glut/glx/glut_dstr.c | 8 | ||||
-rw-r--r-- | src/glut/glx/glut_overlay.c | 6 | ||||
-rw-r--r-- | src/glut/glx/glut_win.c | 8 |
3 files changed, 5 insertions, 17 deletions
diff --git a/src/glut/glx/glut_dstr.c b/src/glut/glx/glut_dstr.c index 981e88ffa4..ec9386f3e5 100644 --- a/src/glut/glx/glut_dstr.c +++ b/src/glut/glx/glut_dstr.c @@ -1530,11 +1530,7 @@ main(int argc, char **argv) char *str, buffer[1024]; int tty = isatty(fileno(stdin)); int overlay = 0, showconfig = 0; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - GLXFBConfigSGIX fbc; -#else void *fbc; -#endif #if !defined(_WIN32) dpy = XOpenDisplay(NULL); @@ -1563,10 +1559,10 @@ main(int argc, char **argv) } else { if (overlay) { vinfo = getVisualInfoFromString(str, &treatAsSingle, - requiredOverlayCriteria, numRequiredOverlayCriteria, requiredOverlayCriteriaMask, (void**) &fbc); + requiredOverlayCriteria, numRequiredOverlayCriteria, requiredOverlayCriteriaMask, &fbc); } else { vinfo = getVisualInfoFromString(str, &treatAsSingle, - requiredWindowCriteria, numRequiredWindowCriteria, requiredWindowCriteriaMask, (void**) &fbc); + requiredWindowCriteria, numRequiredWindowCriteria, requiredWindowCriteriaMask, &fbc); } if (vinfo) { printf("\n"); diff --git a/src/glut/glx/glut_overlay.c b/src/glut/glx/glut_overlay.c index 937ecb6824..837bbc3cb2 100644 --- a/src/glut/glx/glut_overlay.c +++ b/src/glut/glx/glut_overlay.c @@ -362,11 +362,7 @@ glutEstablishOverlay(void) GLUToverlay *overlay; GLUTwindow *window; XSetWindowAttributes wa; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - GLXFBConfigSGIX fbc; -#else void *fbc; -#endif /* Register a routine to free an overlay with glut_win.c; this keeps glut_win.c from pulling in all of @@ -389,7 +385,7 @@ glutEstablishOverlay(void) __glutFatalError("out of memory."); overlay->vis = determineOverlayVisual(&overlay->treatAsSingle, - &overlay->visAlloced, (void **) &fbc); + &overlay->visAlloced, &fbc); if (!overlay->vis) { __glutFatalError("lacks overlay support."); } diff --git a/src/glut/glx/glut_win.c b/src/glut/glx/glut_win.c index 4b044d084d..9b9e6e3022 100644 --- a/src/glut/glx/glut_win.c +++ b/src/glut/glx/glut_win.c @@ -30,7 +30,7 @@ GLUTwindow *__glutMenuWindow = NULL; void (*__glutFreeOverlayFunc) (GLUToverlay *); XVisualInfo *(*__glutDetermineVisualFromString) (char *string, Bool * treatAsSingle, - Criterion * requiredCriteria, int nRequired, int requiredMask, void** fbc) = NULL; + Criterion * requiredCriteria, int nRequired, int requiredMask, void **fbc) = NULL; static Criterion requiredWindowCriteria[] = { @@ -471,11 +471,7 @@ __glutCreateWindow(GLUTwindow * parent, unsigned long attribMask; int winnum; int i; -#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_fbconfig) - GLXFBConfigSGIX fbc; -#else void *fbc; -#endif #if defined(_WIN32) WNDCLASS wc; @@ -501,7 +497,7 @@ __glutCreateWindow(GLUTwindow * parent, #if !defined(_WIN32) window->vis = __glutDetermineWindowVisual(&window->treatAsSingle, - &window->visAlloced, (void**) &fbc); + &window->visAlloced, &fbc); if (!window->vis) { __glutFatalError( "visual with necessary capabilities not found."); |