From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA20451; Fri, 9 Apr 2004 17:06:20 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA21114 for ; Fri, 9 Apr 2004 17:06:19 +0200 (MET DST) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i39F6HYM022410 for ; Fri, 9 Apr 2004 17:06:18 +0200 Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.11.6/8.10.1) with ESMTP id i39F6BQ13137; Fri, 9 Apr 2004 10:06:13 -0500 (CDT) Date: Fri, 9 Apr 2004 11:12:20 -0500 (CDT) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Jon Harrop cc: caml-list@inria.fr Subject: Re: [Caml-list] OpenGL In-Reply-To: <200404091157.08709.jdh30@cam.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 wether:01 api:01 api:01 language's:01 offtopic:01 superset:01 ocaml:01 ocaml:01 approaches:01 opengl:02 opengl:02 thread:02 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 220 On Fri, 9 Apr 2004, Jon Harrop wrote: > On Friday 09 April 2004 2:45 am, Brian Hurt wrote: > > A question with respect to this subject: is it necessary to make a 1:1 > > mapping of GL into Ocaml? I'm wondering if a different approach might not > > work better. I'm thinking specifically of Java3D, which while it is built > > on top of GL, doesn't reflect GL in it's design. The advantage of this > > approach is that you can replace GL with other rendering libraries > > (DirectX, for example). > > OpenGL is not for 3D alone, a lot of it is also 2D and some 4D. If someone > were to create a higher level, 3D only interface from ocaml to OpenGL then I > could not use it in my (2D) work, for example. > > Also, OpenGL has a very carefully thought out design which works very well. I'll admit to not having a lot of experience with OpenGL (or any other 3D rendering library), and have not given one thought to merging it with Ocaml. But from the reports earlier in this thread, a direct mapping of the OpenGL interface into Ocaml runs into problems, especially in the more advanced functions. Which is what lead me to question wether we were thinking inside a box. Note that defining a new API interface has it's own problems. First of all, you'd be looking at more work than a simple mapping. Second, any new API has the danger of being a bad idea. Third, you're throwing away people's experience with OpenGL. Advantages include increased portability and being able to follow the best design practices of Ocaml and not C. Note that I'm not saying we should reimplement Java3D (unless that's the best API we can come up with), I'm just saying that it's an existance proof that a language's 3D library doesn't have to be a simple mapping onto OpenGL. I'd love to hear someone who's done real 3D work comparing and contrasting OpenGL and Java3D as approaches. But I think that's mildly offtopic for this list. > > Moreover, as OpenGL is available on a superset of the platforms for which > Direct3D is available, what would be the advantage in using Direct3D as a > back end rather than OpenGL? Supposedly performance, but I've never seen hard numbers. -- "Usenet is like a herd of performing elephants with diarrhea -- massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it." - Gene Spafford Brian ------------------- 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