comp.lang.ada
 help / color / mirror / Atom feed
From: Warren <ve3wwg@gmail.com>
Subject: Re: OpenGL in Ada
Date: Mon, 12 Jul 2010 17:04:39 +0000 (UTC)
Date: 2010-07-12T17:04:39+00:00	[thread overview]
Message-ID: <Xns9DB385080ED5AWarrensBlatherings@85.214.73.210> (raw)
In-Reply-To: 2074b3a5-12f3-4260-a2ad-f15ed251e378@d16g2000yqb.googlegroups.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2926 bytes --]

Gene expounded in
news:2074b3a5-12f3-4260-a2ad-f15ed251e378@d16g2000yqb.googlegroups.com: 

> On Jul 9, 1:38�pm, Shark8 <onewingedsh...@gmail.com> wrote:
>> On Jul 9, 9:11�am, Gene <gene.ress...@gmail.com> wrote:
>> > On Jul 7, 10:42�pm, Shark8 <onewingedsh...@gmail.com> wrote:
>>
>> > > Hello everyone,
>> > > I posted about wanting to write an OS in Ada a while ago and, as
>> > > part of that effort I've taken to translating the OpenGL API. No,
>> > > I don't mean JUST running the headers through ato-Ada converter
>> > > but actually translating the API into a more Ada-natural form.
...
>> > Having done this a couple of times myself, you should consider the
>> > approach of writing a specialized program that processes the OpenGL
>> > header into a binding. �OpenGL will remain a moving target as
>> > graphic 
> s
>> > hardware continues to evolve. �Compilers will always have their
>> > uniqu 
> e
>> > quirks. �With all this room for variation, it will probably be
>> > easier to maintain a translator than to revise the binding every
>> > time the standard changes or grows.
>>
>> I see what you're saying. The problem is in the specs, the moving
>> target you mentioned, for example the glBegin function ...
> 
> Well, plus the need for backward compatibility.
> 
> Nonetheless, if you have isolated the need to identify glBegin args in
> a table within a translator, so it can spit out the requisite new
> enumeration equivalences, I believe you are ahead of the game.  No one
> is saying the translator will keep working with zero modifications.
> 
> For (an admittedly contrived) example, if the spec introduces a new
> call that accepts anything glBegin will accept plus a few other flags,
> the translator can encode this idea in a new addendum table and an
> algorithm. This is easier and less error prone going forward than
> remembering to update both enumerations in parallel.

I've not tried to use OpenGL myself, but my two cents worth-

I'd prefer the binding not to be as much of a moving target. One
thing you can use is procedure/function overloading as well as 
differently named procedures/functions.  The Ada binding should
have some of the benefit of hindsight, since it is developed
after. So take that advantage and design an API that is "proper".
In other words, make it less of a binding, than a proper Ada
library layer to the OpenGL behind the scenes.

If you extend something, then I think this can be normally done 
without breaking existing APIs. I know there will be exceptions, 
but I'd be real annoyed if I had to re-work my app every time a 
new version of the binding came out.  

This is one of the reasons that my own open sourced projects 
depend upon as few external projects as possible.  I don't like 
having to re-work and debug other user's problems in my software 
by email, inflicted by other dependency projects' [sometimes] 
whimsical changes.

Warren



  reply	other threads:[~2010-07-12 17:04 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08  2:42 OpenGL in Ada Shark8
2010-07-08 14:15 ` John B. Matthews
2010-07-09  2:18   ` anon
2010-07-12 16:51   ` Warren
2010-07-13 12:26     ` Ludovic Brenta
2010-07-13 13:13       ` Warren
2010-07-09 11:43 ` Gautier write-only
2010-07-09 15:11 ` Gene
2010-07-09 17:38   ` Shark8
2010-07-09 20:54     ` Gene
2010-07-12 17:04       ` Warren [this message]
2010-07-10  4:00     ` BrianG
2010-07-10 11:47       ` Gautier write-only
2010-07-11  2:45         ` BrianG
2010-07-11  4:10           ` Gautier write-only
2010-07-11  5:30       ` tmoran
2010-07-11 20:46         ` anon
2010-07-12 14:17           ` Shark8
2010-07-13  0:45             ` BrianG
2010-07-13 17:50               ` anon
2010-07-13 18:37                 ` Shark8
2015-01-15  7:11 ` OpenGL in Ada #2 JillRivas
2015-01-30 14:45 ` OpenGL in Ada Lucretia
2015-01-30 18:41   ` David Botton
  -- strict thread matches above, loose matches on Subject: below --
2010-10-05 21:23 Yves Bailly
2010-10-06  3:45 ` anon
2010-10-06  5:10   ` Yves Bailly
2010-10-06  9:51     ` Alex R. Mosteo
2010-10-06 10:38       ` Yves Bailly
2010-10-06 10:59         ` Ludovic Brenta
2010-10-06 16:07           ` Pascal Obry
2010-10-06 17:32             ` Yves Bailly
2010-10-06  8:38 ` Gautier write-only
2010-10-07  1:52   ` BrianG
2010-10-07 22:06     ` Yves Bailly
2010-10-08 17:11     ` Shark8
2010-10-08 15:02 ` Lucretia
2010-10-08 20:42   ` Yves Bailly
2010-10-10 19:49     ` Vadim Godunko
2009-10-28 17:12 Opengl " Pablo
2009-10-28 18:01 ` Pascal Obry
2009-10-28 19:04   ` John B. Matthews
2009-10-29  6:11 ` Gautier write-only
2000-04-27  0:00 OpenGl in ADA Anderson
2000-04-27  0:00 ` Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox