[opensuse] glXChooseVisual can't select XVisualInfo struct on both 42.3 & 15?
All, Stray issue with initializing an openGL application. For some reason in both 42.3 and 15 glXChooseVisual will return NULL regardless of attributes used. (even the defaults). If anyone has the glut and the openGL devel packages installed, I would like to see if anyone can confirm this behavior. A simple init snippet in C that will do it is: #include <GL/glx.h> #include <GL/gl.h> #include <GL/glu.h> #include <X11/Xlib.h> #include <X11/Xutil.h> #include <stdio.h> #include <stdlib.h> int main (void) { Display *dpy; static int attributes[] = {GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None}; XVisualInfo *vi; int errbase, eventbase; dpy = XOpenDisplay(NULL); if (dpy == NULL) { fprintf (stderr, "XOpenDisplay: could not open display\n"); exit (EXIT_FAILURE); } if (!glXQueryExtension (dpy, &errbase, &eventbase)){ fprintf (stderr, "glXQueryExtension: no glx extension"); exit (EXIT_FAILURE); } /* glXChooseVisual returns NULL on 42.3 & 15 regardless of * attributes specified. */ vi = glXChooseVisual (dpy, DefaultScreen(dpy), attributes); if (vi == NULL) { fprintf (stderr, "glXChooseVisual: could not get visual\n"); exit (EXIT_FAILURE); } return 0; } Compile with: gcc -Wall -Wextra -pedantic -Wshadow -std=gnu11 -Ofast -lGL -lGLU -lX11 -o glXChooseVisual_test glXChooseVisual_test.c -lglut Bug opened: https://bugzilla.opensuse.org/show_bug.cgi?id=1099913 -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (1)
-
David C. Rankin