Delivered-To: garrigue at math.nagoya-u.ac.jp Delivered-To: lablgtk at yquem.inria.fr From: Florent Monnier To: lablgtk at yquem.inria.fr Subject: Re: [Lablgtk] lablGL and GLX extentions? Date: Mon, 26 Jan 2009 20:07:39 +0100 References: <20090107103951.bd36a6ba.mle+ocaml at mega-nerd.com> <20090107221831.df57cb6e.mle+ocaml@mega-nerd.com> <200901071500.21121.fmonnier@linux-nantes.fr.eu.org> In-Reply-To: <200901071500.21121.fmonnier at linux-nantes.fr.eu.org> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200901262007.39889.fmonnier at linux-nantes.fr.eu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAA AEtQTFRFERMQHyEeJiclMTIwOTs4SUpIV1lWYGJgaWtoPIGve316g4WCXJO6bqDDnZ+cq qypkbjSuLq3vsC9sc3gyszJ0OHs3uDd7/Lv/f/8DWCNgQAAAitJREFUSMfdVtmS4yAMdB LAdgyYU+L/v3QF+AAnmZ19mZpaqlwBp1uodSVD+sc1/OcEhOCsdQG/Q8hgFwDzzsHfCAc 4Ru8xYct4IQA4Wy17Jee8TEL7gUB+7GBTwWWpFOAN4QDHFlxWRPdCAFesRKPm12WSwwsB KHbk9Px+ycanYbOPaN5ClY/kYITQEwi/+U2A8x4f85eeNmecCoE0mQrOp3hGp8Yu7w4RQ 1WQyGzcjRRfpFJyO9Plp4idIBuCUoaWUvsb1YpobvA7wctNUHkTTdnZToPNGtROOETII4 eUbOyjRKGYd8IRYHWmnGqsJVBNzFVEm2pl2uoIXeKKalnBavNDtjV1iNhKw6bG2sboyso kiy3BYZwvDKne1t9efEXEWULkT+wr/OJSzcRJwJqvpocg9P3QiagR9p0BBz0hdCJyhOOZ Dsp4CNeOg9T3wb4xsfbjtUUpLy8dJI3HbTLg6xDoA9uAHcDbyUdR8KfT8Zh9n2crhYGKk 3ohtoPyi2F8DMTP4MvkQxIXwjYovznuAb4E/9gvUHDNeY9jLmb8QLg5hJRx9OBo8wegCL hOCWniFgt5Qw9kQhj0wDVnyMSi+d3ycVqEFsu4PCxn4TY+6F7GV/7QDy6IgPcgEn8+9UM /eZjWm54cf4phXafJ6uctMUiLdiMHJ8JBWBlPjGvN7lbwZRGTWO+BWUY3CAGcbrAcEmOZ QNqwOFk0VK1QX+bnVt+UcxD2N/51+APpMa9MX4WAXQAAAABJRU5ErkJggg== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Erik de Castro Lopo > > 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 _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk