I’m having quite a hard time with this. SDL thinks that X11 doesn’t support
OpenGL.
std::cout << “QUERYING SYSTEM…”<<std::endl;
int num_ren = SDL_GetNumVideoDrivers();
std::cout << num_ren << " Video Drivers Found!" << std::endl;
for (int i = 0; i < num_ren; i++) {
std::cout << “DRIVER #”<<i<<": "<<SDL_GetVideoDriver(i) <<
std::endl;
}
std::cout << "CURRENT DRIVER: "<<SDL_GetCurrentVideoDriver() <<
std::endl;
num_ren = SDL_GetNumRenderDrivers();
std::cout << num_ren << " Render Drivers Found!" << std::endl;
SDL_RendererInfo info;
for (int i = 0; i < num_ren; i++) {
SDL_GetRenderDriverInfo(i, &info);
std::cout << "RENDERER #"<<i<<": "<<info.name<<std::endl;
if (info.flags & SDL_RENDERER_SOFTWARE) std::cout << "-->
SOFTWARE"<<std::endl;
if (info.flags & SDL_RENDERER_ACCELERATED) std::cout << “–>
ACCELERATED”<<std::endl;
if (info.flags & SDL_RENDERER_PRESENTVSYNC) std::cout << “–>
VSYNC”<<std::endl;
if (info.flags & SDL_RENDERER_TARGETTEXTURE) std::cout << “–>
TEXTURE”<<std::endl;
std::cout<<std::endl;
}
QUERYING SYSTEM…
2 Video Drivers Found!
DRIVER #0: x11
DRIVER #1: dummy
CURRENT DRIVER: x11
1 Render Drivers Found!
RENDERER #0: software
–> SOFTWARE
–> TEXTURE
However, while configuring:
checking for X11/extensions/Xext.h… yes
– dynamic libX11 -> libX11.so.6
– dynamic libX11ext -> libXext.so.6
checking for const parameter to XextAddDisplay… yes
checking for const parameter to _XData32… no
checking for XGenericEvent… yes
checking for XkbKeycodeToKeysym in -lX11… yes
checking for X11/Xcursor/Xcursor.h… no
checking for X11/extensions/Xinerama.h… no
checking for X11/extensions/XInput2.h… no
checking for X11/extensions/Xrandr.h… yes
– dynamic libXrandr -> libXrandr.so.2
checking for X11/extensions/scrnsaver.h… no
checking for X11/extensions/shape.h… yes
checking for X11/extensions/xf86vmode.h… yes
– dynamic libXxf86vm -> libXxf86vm.so.1
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
and glxgears --info returns as expected
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
GL_RENDERER = GeForce 8400 GS/PCIe/SSE2
GL_VERSION = 3.3.0 NVIDIA 304.88
GL_VENDOR = NVIDIA Corporation
if it helps glxinfo | head -n 42 returns
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_swap_control, GLX_EXT_swap_control_tear,
GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_EXT_create_context_es_profile,
GLX_EXT_create_context_es2_profile, GLX_ARB_create_context_robustness,
GLX_ARB_multisample, GLX_NV_float_buffer, GLX_ARB_fbconfig_float,
GLX_EXT_framebuffer_sRGB, GLX_NV_multisample_coverage
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer,
GLX_SGI_swap_control, GLX_EXT_swap_control, GLX_EXT_swap_control_tear,
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_NV_float_buffer, GLX_ARB_fbconfig_float,
GLX_EXT_fbconfig_packed_float, GLX_EXT_texture_from_pixmap,
GLX_EXT_framebuffer_sRGB, GLX_NV_present_video, GLX_NV_copy_image,
GLX_NV_multisample_coverage, GLX_NV_video_capture,
GLX_EXT_create_context_es2_profile, GLX_ARB_create_context_robustness
GLX version: 1.4
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_swap_control, GLX_EXT_swap_control_tear,
GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_EXT_create_context_es2_profile,
GLX_ARB_create_context_robustness, GLX_ARB_multisample,
GLX_NV_float_buffer, GLX_ARB_fbconfig_float, GLX_EXT_framebuffer_sRGB,
GLX_NV_multisample_coverage, GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 8400 GS/PCIe/SSE2
OpenGL version string: 3.3.0 NVIDIA 304.88
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler
OpenGL extensions:
I’ve been struggling with this for 3 days now and I’m clueless, i’ve
reinstalled the nvidia drivers twice, even the free ones and it doesn’t
work either. Funny thing, I have another computer in with it works
perfectly (although it has a nVidia 9400, but they use the same driver)
Anyone has an idea?