delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/30/20:52:36

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 30 Sep 2003 20:52:19 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: Future of OpenGL package (Earnie, please read this)
In-Reply-To: <5.2.0.9.0.20030930190738.02935508@irispavp.igb.umontreal.ca>
Message-ID: <Pine.GSO.4.56.0309302011220.26607@slinky.cs.nyu.edu>
References: <5 DOT 2 DOT 0 DOT 9 DOT 0 DOT 20030930190738 DOT 02935508 AT irispavp DOT igb DOT umontreal DOT ca>
Importance: Normal
MIME-Version: 1.0

On Tue, 30 Sep 2003, Andre Bleau wrote:

> Igor Pechtchanski wrote:
>
> >On Fri, 26 Sep 2003, Andre Bleau wrote:
> >
> > > ...
> > > Even, with 1.4 headers, you would sill need to jump through hoops to use
> > > 1.4 functionality. You will still need to load the functions dynamicaly
> > > before using them. You wouldn't be able to simply call the functions as
> > > when developing for UNIX.
> >
> >André,
> >
> >Cygwin DLL uses the autoload functionality for some of the required
> >functions, so that they can simply be called after a test (i.e., something
> >like
> >
> >if (hasSomeFunction())
> >   callSomeFunction();
> >
> >Perhaps this could be employed in the OpenGL library layer as well...  I
> >don't know enough off-hand about the autoloading process, but there is a
> >fairly detailed description in winsup/cygwin/how-autoload-works.txt in the
> >Cygwin sources.  Might be worth investigating...
> >
>
> Well, that's exactly what packages like extgl provide: an easier way to
> test if some functionality is available, and if it is, to load it and use it.
>
> I was thinking of including extgl in the next major release of the OpenGL
> package.
>
> However, porting UNIX program that uses GL 1.2+ functions would still be a
> pain, although a somewhat lower pain. Say you have a UNIX program with a
> line like this:
>
> glNewFunctionThatDrawsACompleteKitchenIncludingTheSink(GL_KITCHEN_COLOR_PATTERN);
>
> The Cygwin version would be, if we would use something like extgl:
>
> Option A:
>
> if (hasNewFunctionThatDrawsACompleteKitchenIncludingTheSink)
>     glNewFunctionThatDrawsACompleteKitchenIncludingTheSink(GL_KITCHEN_COLOR_PATTERN);
> else {
>     fprintf(stderr, "Sorry, can't draw your kitchen. Please update your GL drivers and come again.\n");
>     exit(1);
> }
>
> or, Option B:
> if (hasNewFunctionThatDrawsACompleteKitchenIncludingTheSink)
>     glNewFunctionThatDrawsACompleteKitchenIncludingTheSink(GL_KITCHEN_COLOR_PATTERN);
> else
>     myOwn2000LinesOfCodeFunction(GL_KITCHEN_COLOR_PATTERN);
>
> There are dozens of GL 1.2+ functions now. If you select Option A,
> rewriting some program to use them conditionally can be a major task. As
> for Option B, it is a task of Herculean proportions.

Well, I was actually thinking of the GL library having a wrapper for each
function that did the check and either called the real function or failed.
The UNIX code won't change at all, and the wrappers in your library will
initially look like Option A above.  Then whoever needs the functionality
can send you implementations of "myOwn2000LinesOfCodeFunction"s, which you
can add as you see fit.

> [snip]
> > > - Update the GLUT dll to Nate Robin's 3.7.6
> > > - Have GLUI and GLUIX libs compiled for gcc 3.3
> >
> >You will probably also need to release the old libraries as compatibility
> >packages for those who still use the pre-gcc-3.3 OpenGL binaries.
>
> So, you suggest that I provide:
> libglui.a and libgluix.a for the last version of gcclibglui-gcc3_2.a and
> libgluix-gcc3_2.a for gcc 3.2
> libglui-gcc2_95.a and libgluix-gcc2_95.a for gcc 2.95
> ???
> None would be bigger than 500k, so the package would still be manageable.

Sure...  You could coordinate the recompile with a major release, and then
name the DLLs after the older version that each represents (e.g., see
openssl-096.dll).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019