Ok. I'll put something together and submit it again.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Farshid Lashkari
Sent: 19 November 2007 17:46
To: OpenSceneGraph Submissions
Subject: Re: [osg-submissions] State.cpp


Hi Joseph,

If this is the case then you might need to modify the initialization
of the _glMaxTextureCoords variable to check if the OpenGL version is
less than 2.0 and use GL_MAX_TEXTURE_UNITS if so.

I can tell you that the current behavior is necessary for the latest
nVidia OpenGL drivers. My card supports 16 texture units but only 8
texture coordinate units, so an error would be caused by your current
fix.

-Farshid

On Nov 19, 2007 9:34 AM, Joseph Steel <[EMAIL PROTECTED]>
wrote:
> On the machine that I've been using _glMaxTextureCoords is 1 and
> _glMaxTextureUnits is 4! Using _glMaxTextureCoords in the test therefore
> prevents me using the other texture units.
>
> Ahh! On this machine calling:
>  glGetIntegerv(GL_MAX_TEXTURE_COORDS,&_glMaxTextureCoords);
>
> gives an error in initializeExtensionProcs() (GL_INVALID_ENUM = pname was
> not an accepted value). As the value of _glMaxTextureCoords is initialised
> to 1 then this value remains.
>
> The driver on this machine supports OpenGL v1.5 100% but not 2.0. Would I
be
> right in thinking that GL_MAX_TEXTURE_COORDS is in OpenGL2.0 and not
> necessarily in earlier versions?
>
> If this is the case, as it seems, what's the solution? The answer isn't
> update the drivers on my machine!
>
> Joseph
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Farshid Lashkari
> Sent: 19 November 2007 17:07
> To: OpenSceneGraph Submissions
> Subject: Re: [osg-submissions] State.cpp
>
>
> Hi Joseph,
>
> The documentation for glClientActiveTexture says the index can range
> from 0 to GL_MAX_TEXTURE_COORDS - 1, so I believe the current behavior
> is correct. Here is the link to the documentation for this command on
> the OpenGL site:
>
> http://www.opengl.org/sdk/docs/man/xhtml/glClientActiveTexture.xml
>
> -Farshid
>
> On Nov 19, 2007 3:20 AM, Joseph Steel <[EMAIL PROTECTED]>
> wrote:
> >
> >
> >
> >
> > In osg Ver2.2 public release osg::State::setClientActiveTextureUnit
> > (State.cpp, line759) the test (I think) should be:
> >
> > if (_glClientActiveTexture && unit < (unsigned int)_glMaxTextureUnits)
> >
> > and not _glMaxTextureCoords.
> >
> > I've attached a modified version of the file (osg\State.cpp)
> >
> > Joseph Steel
> > _______________________________________________
> > osg-submissions mailing list
> > [email protected]
> >
>
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.
> org
> >
> >
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.
> org
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.
org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.
org

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to