Re: lablGL and GLX extentions?
Erik de Castro Lopo <[email protected]> Wed, 7 Jan 2009 22:18:31 +1100
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Organization | Erik Conspiracy Secret Labs |
| Message-ID | <[email protected]> |
Florent Monnier wrote:
> On which points? could you develop?
Coding OpenGL in C is simply too much of a PITA, with all the memory
management issues etc. Python is too much of a pain because of run
time errors that that compiler should have found.
> Also I have made an attempt to make a simili-functional opengl interface:
> http://www.linux-nantes.org/~fmonnier/OCaml/GL/doc/FunGL.html
Ow, the colours on that page make it a little hard to read.
Is this an alternative to lablGL?
> It is possible to compose a pixmap into an OpenGL texture,
Yep, I knew how to do that, but ...
> and you can get a pixmap from a window.
I was a bit stuck on how to do the second part.
What I'm basically try to do is place 2D application windows in a 3D
space, much like SUN's Project Looking Glass:
http://www.sun.com/images/k3/k3_lglass_gallery3.gif
and then handle mouse and keyboard events and pass them on down to
the 2D windows as required.
> This technique is explained here (for C):
> http://www.opengl.org/wiki/index.php/Programming_OpenGL_in_Linux:_Creating_a_texture_from_a_Pixmap
>
> It can be achieved from OCaml in exactly the same way.
> I have made an ocaml version of this demo program.
> This script is called "pixmap_to_gl.ml" in the Xlib-OCaml bindings here:
> http://www.linux-nantes.org/~fmonnier/OCaml/Xlib/
I tried to compile that with the shell script provied but got:
Cannot find file GL.cma.
> So to answer to your question, yes you can use LablGL with GLX:
> http://www.linux-nantes.org/~fmonnier/OCaml/Xlib/doc/GLX.html
>
> (there are still a couple of functions from the GLX api that are not wrapped
> yet, if you need those just ask)
I am under the impression that I need glXBindTexImageEXT, glXReleaseTexImageEXT
and maybe some others.
> PS: you are not on the LablGL mailing list but on the LablGTK one!
I goggled for "lablGL mailing list" but didn't find one and there was
recently an announcement on this list of a new version of lablGL.
Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Every time microshaft's stock price drops again, I rejoice. I
want to see that bunch of criminals brought to their knees.
Preferably at the chopping block."
-- rixt in http://linuxtoday.com/stories/20659_flat.html