caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Nickolay Semyonov-Kolchin <snob@snob.spb.ru>
To: Sven Luther <luther@dpt-info.u-strasbg.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Announce: camlgl - OpenGL bindings for OCaml
Date: Sat, 21 Dec 2002 02:19:18 +0500	[thread overview]
Message-ID: <200212210219.18421.snob@snob.spb.ru> (raw)
In-Reply-To: <20021220152805.GA3522@iliana>

On Friday 20 December 2002 20:28, Sven Luther wrote:
> >
> > http://www.sf.net/projects/camlgl
> >
> > Key Features:
> > - Full OpenGL 1.4 support
> > - All window system independent ARB extensions supported
> > - All published NVidia extensions supported (including NV30)
> > - All ATI extensions supported
> > - Windows and Linux version
> > - GLFW bindings
> > - unsupported Glut and SDL bindings
>
> Would you care to comment about the difference between your bindings and
> the lablgl bindings, 

Unsorted comparison:
- LablGL is a high level library build on top of the GL. 
- CamlGL provides direct GL bindings.
---------------------------------------------
/* C code */
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glRotatef(1.0f,0.0f,2.0f,0.0f);
glVertex3f(1.0f,1.0f,1.0f);

(* LablGL version *)
GlMat.mode `modelview;
GlMat.push ();
GlMat.rotate ~angle:1.0 ~y:2.0 ();
GlDraw.vertex ~x:1.0 ~y:1.0 ~z:1.0 ();

(* CamlGL version *)
open Gl
glMatrixMode cgl_modelview;
glPushMatrix ();
glRotatef 1.0 0.0 2.0 0.0;
glVertex3f 1.0 1.0 1.0;
---------------------------------------------
- LablGL (afaik) support all Ocaml enironments
- CamlGL (at present time) support only Linux and Windows (VC version)

- LablGL implements only a subset of OGL functions.
- CamlGL has full OGL support (with two exceptions)
glGetPointerv and glMultiDrawElements are not supported.

- LablGL has partitial GLU support
- CamlGL has no GLU support (and will never have)

- LablGL is a safe library
- CamlGL may produce "unstable" behaviour
I.e. if glGenLists or glGenTextures return value bigger than Caml max_int --- 
you are doomed. (Not possible with current NVidia & ATI drivers). You can get 
a segfault by giving incorrect array bounds for GL data, and so on. 

- CamlGL uses dynamic function loading which can cause trouble under Windows 
enironment. (This is poor theory)

- CamlGL produces very big executable files: ~700K under Linux, ~400K under 
Windows. (I don't care about that)

- CamlGL programs can be much faster than LablGL (VA, VAR, VAO, VP, etc)

- CamlGL can be integrated with existing C libraries without any trouble. 
(Bigarrays)

- CamlGL can be used for modern 3d graphics. (Vertex shaders, Pixel shaders, 
Multitexturing, VAR/VAO)

> the reason which made you implement a new
> alternative 

LablGL has no support for GL extensions and uses syntax very different from 
normal GL. 

>and the problems there would be in unifying both
> implementations ?

LablGL can be implemented on top of my library. 

> Would it also be possible to use it with lablgtk, do you think ?
>

Yes, I'am using it with lablgtk. I can send you description (cryptic) how this 
can be done. 

Comments, suggestions are always welcome.

Nickolay
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-12-20 23:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-20 10:46 Nickolay Semyonov-Kolchin
2002-12-20 15:28 ` Sven Luther
2002-12-20 21:19   ` Nickolay Semyonov-Kolchin [this message]
2002-12-25  2:37     ` Jacques Garrigue
2002-12-25  8:37       ` [Caml-list] Summary: LablGL vs CamlGL Nickolay Semyonov-Kolchin
2002-12-27 12:10       ` [Caml-list] Announce: camlgl - OpenGL bindings for OCaml Christophe Raffalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200212210219.18421.snob@snob.spb.ru \
    --to=snob@snob.spb.ru \
    --cc=caml-list@inria.fr \
    --cc=luther@dpt-info.u-strasbg.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).