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

Re: [PATCH] GL12 Compatibility

To: jamagallon@xxxxxxx
Subject: Re: [PATCH] GL12 Compatibility
From: jlim@xxxxxxxxxxxxxxxxxxxx (Jonathan Lim)
Date: Tue, 12 Dec 2000 18:01:10 -0800 (PST)
Cc: info-inventor-dev@xxxxxxxxxxx (OpenInventor Devel List)
In-reply-to: <20001202010946.I3982@xxxxxxxxxxxxxxxx> from "J . A . Magallon" at Dec 02, 2000 01:09:46 AM
Sender: owner-info-inventor-dev@xxxxxxxxxxx
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

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