info-inventor-dev
[Top] [All Lists]

Re: [PATCH] GL12 Compatibility

To: Jonathan Lim <jlim@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] GL12 Compatibility
From: Tom Flynn <flynnt@xxxxxxxxxxxx>
Date: Wed, 13 Dec 2000 22:04:31 -0800
Cc: jamagallon@xxxxxxx, OpenInventor Devel List <info-inventor-dev@xxxxxxxxxxx>
In-reply-to: <200012130201.SAA89819@kinabalu.csd.sgi.com>
Sender: owner-info-inventor-dev@xxxxxxxxxxx
For what it is worth, I haven't encountered such problems with Inventor
as of yet, but have encountered such problem when porting Performer to
Linux and had to make similar kinds of changes.  Not all OpenGL vendors
provide backwards compatability with older versions of OpenGL and it is
not required of them.  It may unfortunate for application and toolkit
developers, but we have to work with it.  

-tom

On Tue, 12 Dec 2000, Jonathan Lim wrote:

> Hi all,
> 
> I'm about the check the following changes in. Has anyone else encountered
> similar problems and wish to add to the discussion?
> 
> 
>               Jonathan Lim  _  Silicon Graphics  _  Mountain View
>               GPS Graphics     Computer Systems        CA, USA
> 
> 
> On Fri Dec  1 16:09:46 2000, jamagallon@xxxxxxx wrote:
> > 
> > Hi everyone,
> > 
> > I have been building OIV in a Mandrake 7.2 with XFree4.0.1. This xfree 
> > includes
> > version 3.4 of Mesa, that is supposed to be GL1.2 compatible. That gives 
> > some
> > drawbacks whe building Open Inventor. Basicly, inventor is coded against
> > old OpenGL 1.0, where (for example) TexObjs were an extension, and recent
> > GLs are 1.1 or 1.2, where TexObjs ar mandatory and functions do not have the
> > EXT tail.
> > 
> > Some implementations can support both interfaces (I think even mesa can do
> > through preprocessor define flags), but I thin it is cleaner to write the
> > code like:
> > 
> > #ifndef GL_VERSION_1_1
> >    glBindTextureEXT(GL_TEXTURE_2D, 0);
> > #else
> >    glBindTexture(GL_TEXTURE_2D, 0);
> > #endif
> > 
> > I also think that for this kind of features (EXTs that have been adopted)
> > one could skip the tests for extension presence, because the interface
> > is supposed to be usable even if it does nothing (ie, it is just a
> > software cache...), but I am not fully confident and so have made the
> > minimal changes. If someone can tell me sure (hey, SGI people...) that
> > this can be made, I can prepare the patch.
> > 
> > Changes are:
> > 
> > - A couple of casts to make g++2.96 shut up.
> > - Poylgon offset interface.
> > - Texture objects
> > - Tesselator interface if GLU version is 1.2.
> > 
> > Files affected are:
> > apps/demos/textomatic/TextWrapper.c++
> > apps/nodes/Decal/Decal.c++
> > lib/database/src/so/elements/SoGLTextureImageElement.c++
> > lib/database/src/so/elements/SoGLCacheContextElement.c++
> > lib/database/src/so/nodes/SoShape.c++
> > lib/database/src/so/nodes/SoAsciiText.c++
> > 
> > Please, apply. I think it does not break anything and updates build
> > compatibility.
> > 
> > If you apply this on CVS, please let me or the list know, so I trash
> > my patches and download corrected CVS.
> > 
> > Thank you.
> > 
> > -- 
> > Juan Antonio Magallon Lacarta                                 #> cd /pub
> > mailto:jamagallon@xxxxxxx                                     #> more beer
> 

--
"Mongooses are famous for their snake-fighting ability, and are
 almost always victorious because of their speed, agility, and timing
 and also because of their thick coat."


<Prev in Thread] Current Thread [Next in Thread>