]> git.saurik.com Git - wxWidgets.git/blame - utils/glcanvas/motif/readme.txt
compilation fixes
[wxWidgets.git] / utils / glcanvas / motif / readme.txt
CommitLineData
06ad8636
JS
1GLCanvas class for wxWindows 1.66 using the GLX protocol extension
2==================================================================
3
4I have just uploaded a file 'wx166glx.tar.gz' to the wxWindows
5incoming directory. It contains an implementation of a GLCanvas class
6(interfacing an ordinary wxCanvas with OpenGL calls) for X11 (I tested
7with Motif, maybe it works with XView as well). I tried to imitate
8what Julian did in 'wxmesa1.zip' for MS Windows in conjunction with
9the Mesa library.
10
11Of the several possibilities to use OpenGL under X11, I chose the GLX
12server extension, because it is the most efficient method on machines
13with graphics hardware support (I expect wxWindows/OpenGL applications
14to _fly_ on my Indy :-). However, you don't need a 'real' OpenGL
15implementation to use GLCanvas -- the free Mesa library has a
16simulated GLX interface built-in. Just link in libMesaGLU and
17libMesaGL along with libwx_motif and everything should work fine.
18
19Installation:
20
21Untar wx166glx.tar.gz from your main wxWindows directory (i.e. where
22the `include' and `src' subdirectories are). Then apply the small
23patch file which has appeared in the `glx' subdirectory:
24
25% patch -p0 < glx/wx166-glx.diff
26
27Recompile the wx_motif library in the standard way. The inclusion of
28the GLCanvas class in libwx_motif is protected with a new 'USE_GLX'
29flag in wx_setup.h, so it could maybe be included in a future
30wxWindows release (with USE_GLX turned off by default).
31
32Two new samples (bounce and prim) are included. I adapted them from
33wxmesa1.zip -- they should compile under both MS Windows (with wxMesa)
34and X11. The makefile.unx's are set up for the Mesa libraries; if you
35have original libGLU/libGL's just change the GLLIBS = ... line.
36
37Problems:
38
39One more or less serious problem remains: the visual generated by the
40GLCanvas class must match the visual of wxCanvas.xwindow (which
41currently is always the screen's default visual). The end result is
42that you will get a nice RGB mode for OpenGL only if your display's
43default visual is TrueColor or DirectColor (the XFree86 S3 servers for
44PCs with the '-bpp 16/32' option are examples). I'm contemplating a
45solution where the wxCanvas drawingarea widget is destroyed and then
46re-created from within the GLCanvas constructor. I would welcome
47suggestions on this and discussions of the GLCanvas 'API'.
48
49Regards,
50
51Wolfram Gloger.
52(Gloger@lrz.uni-muenchen.de)