Menu

#22 GLWXDriver2D building

2.2 pre 1
closed
None
cs
gnu/linux
x86
intel
other plugins
bug
2.1 svn dev
2015-07-12
2015-07-03
No

I build CS (svn revision 40279) on x86 32bits linux platform (MAGEIA 5), using gcc-c++ (4.9.2) and libwxgtku3.0-devel (3.0.2). GLWXDriver2D's build crashes with the following error message:

C++ ./out/linuxx86/optimize/plugins/video/canvas/wxgl/GLWXDriver2D.o
...
In file included from /usr/include/wx-3.0/wx/gtk/glcanvas.h:14:0,
from /usr/include/wx-3.0/wx/glcanvas.h:192,
from /home/buddy/rpmbuild/BUILD/crystalspace-src-2.1/plugins/video/canvas/wxgl/GLWXDriver2D.h:26,
from /home/buddy/rpmbuild/BUILD/crystalspace-src-2.1/plugins/video/canvas/wxgl/GLWXDriver2D.cpp:68:
/usr/include/wx-3.0/wx/unix/glx11.h: In member function ‘virtual bool csGraphics2DWX::Open()’:
/usr/include/wx-3.0/wx/unix/glx11.h:120:18: erreur: ‘XVisualInfo wxGLCanvasX11::m_vi’ is private
XVisualInfo
m_vi;

...

Analysing the glx11.h file, I find the following declaration in the public area of the class "WXDLLIMPEXP_GL wxGLCanvasX11 : public wxGLCanvasBase:"

// get the GLXFBConfig/XVisualInfo we use
GLXFBConfig GetGLXFBConfig() const { return m_fbc; }
XVisualInfo
GetXVisualInfo() const { return m_vi; }

so I apply the following patch to GLWXDriver2D.cpp :

--- plugins/video/canvas/wxgl/GLWXDriver2D.cpp 2015-07-03 00:01:58.474271335 +0200
+++ plugins/video/canvas/wxgl/GLWXDriver2D.cpp.diff 2015-07-03 00:02:12.186564709 +0200
@@ -351,7 +351,7 @@
{
Display dpy = (Display) wxGetDisplay ();
GLXContext active_GLContext = glXGetCurrentContext();

  • XVisualInfo xvis = (XVisualInfo)theCanvas->m_vi;
  • XVisualInfo xvis = (XVisualInfo)theCanvas->GetXVisualInfo();

    Report (CS_REPORTER_SEVERITY_NOTIFY, "Video driver GL/X version %s",
    glXIsDirect (dpy, active_GLContext) ? "(direct renderer)" :

And then it works fine.
I submit to you this patch to all intents and purposes.

Discussion

  • Eric Sunshine

    Eric Sunshine - 2015-07-12

    Fix applied (untested since I'm not in a position to do so presently) as r40280.

     
  • Eric Sunshine

    Eric Sunshine - 2015-07-12
    • status: open --> closed
    • assigned_to: Eric Sunshine
     

Log in to post a comment.

MongoDB Logo MongoDB