Re: lablGL and GLX extentions?
Florent Monnier <[email protected]> Mon, 26 Jan 2009 20:07:39 +0100
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
> > I am under the impression that I need glXBindTexImageEXT, > > glXReleaseTexImageEXT and maybe some others. > > Ha I see, these functions don't appear in the base manual (I only read the > manual until now), it is an extension : > http://people.freedesktop.org/~davidr/GLX_EXT_texture_from_pixmap.txt in fact the right url is this one: http://www.opengl.org/registry/specs/EXT/texture_from_pixmap.txt (but there aren't real differences) > I guess it provides an optimisation or usefull additional options, because > the script "pixmap_to_gl.ml" already works, but doing real-time this way > would perhaps be too slow. this thread continued off-list, but maybe other people could be interested, That's it I have wrapped the GLX extension "GLX_EXT_texture_from_pixmap" it is a very ALPHA / experimental version which will have to be polished and tested. it's there: http://www.linux-nantes.org/~fmonnier/OCaml/Xlib/ I have noticed differences between running Mesa or the NV-drivers, for example these 2 demos (in the tarball): ./texture_from_pixmap.sh # uses the extension "GLX_EXT_texture_from_pixmap" # this one works fine with Mesa but not with the NV-drivers (this one is the C version rewritten in ocaml, from here: http://cgit.freedesktop.org/mesa/mesa/tree/progs/xdemos/texture_from_pixmap.c and in ocaml: http://www.linux-nantes.org/~fmonnier/OCaml/Xlib/tmp/texture_from_pixmap.ml.html ) ./glxdemo.sh # this one works with my NV-drivers but not with Mesa I switch between NV-drivers and Mesa this way: export LD_LIBRARY_PATH=/tmp/Mesa-7.3/lib # where mesa lib is available export LD_LIBRARY_PATH="" ______________ My 3D desktop under KDE for changing in 3D the desktop and for moving soft windows works just fine (and needs hardware acceleration) so as I do not have the extension 'GLX_EXT_texture_from_pixmap' I think that it is not absolutly needed. The classic method that you can see in the other demo ./pixmap_to_gl.sh works fine with both Mesa and the closed-drivers. So I guess if you wish to use the extension you will still have to put the 2 methods and test if the extension is there to know which method to use. Also the GLX module is opengl-bindings agnostic, the examples I have done use glMLite, but it should work the same with the 2 other ocaml opengl-bindings. (And the sed script glMLite_to_LablGL.sed.sh may help a little to convert.) have fun! Florent