[ocaml-opengl] Problems with LablGL on the rpi
Florent Monnier
monnier.florent at gmail.com
Mon Mar 11 23:55:31 GMT 2013
2013/3/11, Daniel Bünzli <daniel.buenzli__erratique.ch> wrote:
> Le lundi, 11 mars 2013 à 19:38, Yaron Minsky a écrit :
> > I've been playing around with getting lablgl working on the Raspberry
> > Pi, using the Raspian distribution.
>
> Just being curious, are you playing with lablgles [1] or lablgl ? The latter won't give you to > access the raspberry pi's gpu.
Maybe I'll say something wrong, but I understood that Lablgles is
currently for OGL ES 1, and the Raspberry Pi has OGL ES 2.
I would suggest that we call LablGLES LablGLES1 for disambiguation.
If I understood correctly ES 1 is a subset of the deprecated features
(what LablGL currently provides), and ES 2 is a subset of foreward
compatible OGL.
I don't have any OGL ES 1 nor ES 2 hardware. If someone want to offer
me a RB Pi I would accept with pleasure. I recently bought a cheap OGL
3 card just for the purpose of testing OGL 3 in OCaml, and soon OGL 4
will arrive :)
Someone already gave me a Mac for porting purposes, but it was a while
ago and now this Mac is too old.
> But I don't know if the former compiles on raspbian
> without a hitch.
If you're using these
typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
and then get the address of the OGL function it will compile.
It has been made to make software and hardware a little bit independent.
So you can compile something where the hardware provides OGL 2 and
then execute on OGL 3, or the opposite, and we're using the same
header.
Any OGL code should use some wrangler to access the functions. Only
GLCaml does this correctly currently in OCaml with init_lib() and
get_proc_address() in glcaml_stub.c.
Here someone talks about the ES2 subset from GLCaml:
https://sympa.inria.fr/sympa/arc/caml-list/2013-03/msg00040.html
Maybe we could ask him to release his GLCamlES2 patch.
--
Hope it helps
More information about the OpenGL
mailing list