The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Ivy Bridge: SDL2: No OpenGL support on this system
greno


Joined: 09 May 2011
Posts: 47
I installed F17 on an Ivy Bridge system.

I then installed SDL2 from hg.

SDL2 compiled and linked fine.

So I went and built all the SDL2 tests.

But when I try to run them all I see is this:

Code:
$ ./testgl2
No OpenGL support on this system
$ ./testgles
No OpenGL ES support on this system
$ ./testdraw2
Couldn't initialize video driver: No available video device


Code:
$ glxinfo | grep renderer
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile



So it has an OpenGL renderer.

What is missing?

I double check and didn't see X headers so I installed those and reconfigured and recompiled but still no luck.

Still end up with this.

Code:
$ ./testgl2
No OpenGL support on this system
$ ./testgles
No OpenGL ES support on this system
$
$ export DISPLAY=:0
$ ./testdraw2
Couldn't initialize video driver: No available video device
$
$ xhost +
access control disabled, clients can connect from any host
$
$ ./testdraw2
Couldn't initialize video driver: No available video device



Here is the installed xorg packages:
Code:
# yum list installed 'xorg*'
Installed Packages
xorg-x11-drv-ast.x86_64                                 0.93.9-6.fc17                                                @anaconda-0
xorg-x11-drv-ati.x86_64                                 6.14.4-5.20120417git0bda305f7.fc17                           @anaconda-0
xorg-x11-drv-cirrus.x86_64                              1.3.2-19.fc17                                                @anaconda-0
xorg-x11-drv-dummy.x86_64                               0.3.5-4.fc17                                                 @anaconda-0
xorg-x11-drv-evdev.x86_64                               2.7.0-2.fc17                                                 @anaconda-0
xorg-x11-drv-fbdev.x86_64                               0.4.2-8.fc17                                                 @anaconda-0
xorg-x11-drv-intel.x86_64                               2.19.0-1.fc17                                                @anaconda-0
xorg-x11-drv-mga.x86_64                                 1.4.13-19.20120104git9223c44a7.fc17                          @anaconda-0
xorg-x11-drv-nouveau.x86_64                             1:0.0.16-35.20120306gitf5d1cd2.fc17                          @updates   
xorg-x11-drv-openchrome.x86_64                          0.2.906-1.fc17                                               @updates   
xorg-x11-drv-qxl.x86_64                                 0.0.22-0.fc17                                                @anaconda-0
xorg-x11-drv-synaptics.x86_64                           1.6.0-1.fc17                                                 @anaconda-0
xorg-x11-drv-vesa.x86_64                                2.3.0-15.fc17                                                @anaconda-0
xorg-x11-drv-vmmouse.x86_64                             12.8.0-1.fc17                                                @anaconda-0
xorg-x11-drv-vmware.x86_64                              12.0.2-1.fc17                                                @anaconda-0
xorg-x11-drv-void.x86_64                                1.4.0-8.fc17                                                 @anaconda-0
xorg-x11-drv-wacom.x86_64                               0.14.0-2.fc17                                                @anaconda-0
xorg-x11-font-utils.x86_64                              1:7.5-7.fc17                                                 @anaconda-0
xorg-x11-proto-devel.noarch                             7.6-21.fc17                                                  @fedora   
xorg-x11-server-Xephyr.x86_64                           1.12.0-5.fc17                                                @updates   
xorg-x11-server-Xorg.x86_64                             1.12.0-5.fc17                                                @updates   
xorg-x11-server-common.x86_64                           1.12.0-5.fc17                                                @updates   
xorg-x11-server-devel.x86_64                            1.12.0-5.fc17                                                @updates   
xorg-x11-server-utils.x86_64                            7.5-12.fc17                                                  @anaconda-0
xorg-x11-util-macros.noarch                             1.16.1-1.fc17                                                @fedora   
xorg-x11-utils.x86_64                                   7.5-6.fc17                                                   @anaconda-0
xorg-x11-xauth.x86_64                                   1:1.0.7-1.fc17                                               @anaconda-0
xorg-x11-xinit.x86_64                                   1.3.2-5.fc17                                                 @anaconda-0
xorg-x11-xkb-utils.x86_64                               7.5-6.fc17                                                   @anaconda-0


Also:
Code:
# yum list 'libX11*'
Installed Packages
libX11.x86_64                                               1.4.99.901-2.fc17                                        @anaconda-0
libX11-common.noarch                                        1.4.99.901-2.fc17                                        @anaconda-0
libX11-devel.x86_64                                         1.4.99.901-2.fc17                                        @fedora


Also:
Code:
# yum list installed 'mesa*'   
Installed Packages
mesa-dri-drivers.x86_64                                            8.0.3-1.fc17                                         @updates
mesa-dri-filesystem.x86_64                                         8.0.3-1.fc17                                         @updates
mesa-libEGL.x86_64                                                 8.0.3-1.fc17                                         @updates
mesa-libGL.x86_64                                                  8.0.3-1.fc17                                         @updates
mesa-libGLU.x86_64                                                 8.0.3-1.fc17                                         @updates
mesa-libgbm.x86_64                                                 8.0.3-1.fc17                                         @updates
mesa-libglapi.x86_64                                               8.0.3-1.fc17                                         @updates
mesa-libxatracker.x86_64                                           8.0.3-1.fc17                                         @updates


The bulid shows no detection of graphics systems:
Code:
checking for X... no
checking for OpenGL support... no
checking for OpenGL ES support... no


My i7 has Intel 4000 Graphics
And there is NVidia 650M Graphics

.
greno


Joined: 09 May 2011
Posts: 47
Ok. I got the right X11 headers installed finally:
Code:
checking for X... libraries , headers
checking for OpenGL (GLX) support... yes
checking for OpenGL ES (EGL) support... yes
checking for OpenGL ES v1 headers... yes
checking for OpenGL ES v2 headers... yes



but the compile is failing:
Code:
In file included from ../src/video/x11/SDL_x11video.h:56:0,
                 from ../src/video/x11/SDL_x11clipboard.c:28:
../src/video/x11/SDL_x11dyn.h:37:33: fatal error: X11/extensions/Xext.h: No such file or directory
compilation terminated.
make: *** [build/SDL_x11clipboard.lo] Error 1


.
greno


Joined: 09 May 2011
Posts: 47
Installed the full X Software Development plus mesa-libEGL and mesa-libGLES libs and now get a different error but on same file::

Code:
libtool: compile:  gcc -g -O2 -DUSING_GENERATED_CONFIG_H -Iinclude -I../include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_x11dyn.lo -c ../src/video/x11/SDL_x11dyn.c  -fPIC -DPIC -o build/.libs/SDL_x11dyn.o
In file included from ../src/video/x11/SDL_x11dyn.c:110:0:
../src/video/x11/SDL_x11sym.h:106:151: error: conflicting types for ‘XextAddDisplay’
In file included from ../src/video/x11/SDL_x11dyn.h:38:0,
                 from ../src/video/x11/SDL_x11dyn.c:27:
/usr/include/X11/extensions/extutil.h:123:25: note: previous declaration of ‘XextAddDisplay’ was here
make: *** [build/SDL_x11dyn.lo] Error 1
greno


Joined: 09 May 2011
Posts: 47
The problem is caused by a change in libXext.

Here's a patch that fixes SDL_x11sym.h:


Code:
diff -r 601b0e251822 src/video/x11/SDL_x11sym.h
--- a/src/video/x11/SDL_x11sym.h   Mon Apr 09 23:55:43 2012 -0400
+++ b/src/video/x11/SDL_x11sym.h   Sat Jun 09 09:06:39 2012 -0400
@@ -103,7 +103,7 @@
 SDL_X11_SYM(int,XUnmapWindow,(Display* a,Window b),(a,b),return)
 SDL_X11_SYM(int,XWarpPointer,(Display* a,Window b,Window c,int d,int e,unsigned int f,unsigned int g,int h,int i),(a,b,c,d,e,f,g,h,i),return)
 SDL_X11_SYM(VisualID,XVisualIDFromVisual,(Visual* a),(a),return)
-SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return)
+SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return)
 SDL_X11_SYM(XExtensionInfo*,XextCreateExtension,(void),(),return)
 SDL_X11_SYM(void,XextDestroyExtension,(XExtensionInfo* a),(a),)
 SDL_X11_SYM(XExtDisplayInfo*,XextFindDisplay,(XExtensionInfo* a,Display* b),(a,b),return)



.
greno


Joined: 09 May 2011
Posts: 47
So after all that and recompiling SDL2 and the tests I still get this:

Code:
$ ./testdraw2
Couldn't initialize video driver: No available video device
$ ./testgl2
No OpenGL support on this system
$ ./testgles
Couldn't initialize video driver: No available video device


Again this is on an Ivy Bridge system:
Code:
i7-3720QM
Integrated Intel 4000 Graphics (iGPU)
NVidia 650M Graphics (GPU)


I also tried running RenderBench:
Code:
Phoronix Test Suite v3.8.0

    To Install: pts/render-bench-1.1.2

    Determining File Requirements ..........................................
    Searching Download Caches ..............................................

    1 Test To Install
        1 File To Download [0.02MB]
        1MB Of Disk Space Is Needed

    pts/render-bench-1.1.2:
        Test Installation 1 of 1
        1 File Needed [0.02 MB]
        Downloading: render_bench.tar.gz                            [0.02MB]
        Downloading ........................................................
        Installation Size: 0.12 MB
        Installing Test @ 14:31:10


but it just hangs at Installing Test and never completes. This is probably a red herring and just a RenderBench problem.


.
greno


Joined: 09 May 2011
Posts: 47
Ok, went back and did 'make clean' everywhere and reran the compiles and install.

Now testdraw2 works with software renderer but still nothing as far as GL:
Code:
$ ./testdraw2 --renderer software
SDL_CreateWindow called
SDL_CreateWindow called
159.06 frames per second
$ ./testdraw2 --renderer opengl
SDL_CreateWindow called
SDL_CreateWindow called
Couldn't create renderer:
$ ./testdraw2 --renderer opengles
SDL_CreateWindow called
SDL_CreateWindow called
Couldn't create renderer:
$ ./testdraw2 --renderer opengles2
SDL_CreateWindow called
SDL_CreateWindow called
Couldn't create renderer:

$ ./testgl2
No OpenGL support on this system
$ ./testgles
SDL_CreateWindow called
SDL_CreateWindow called
Couldn't create window:


testgl2 is failing b/c HAVE_OPENGL is not defined. It should be set since it's installed.

And the testgles test failures are this post: http://forums.libsdl.org/viewtopic.php?t=8160

UDPATE: BTW, the lines: "SDL_CreateWindow called" come from a debug line I put into the code to see what was happening. You will not see this line.

.