After spending the afternoon looking through this it appears that IMHO
OpenSG might [1] be doing something incorrect. Here is what I think is going
on:

When a geometry core is being processed with a shader material, it forces
the GeoVertexArrayPumpGroup to use the generic attribute
functions glVertexAttribPointer instead of the older
glVertexPointer/glNormalPointer equivalents. Since we are using the generic
attribute functions, I believe that we need to call glBindAttribLocation in
order to access these values in the shaders.

So I believe that I can't access the texture coordinates using the old
gl_MultiTexCoord0 attribute because OpenSG is using glVertexAttribPointer
instead of glTextureCoordPointer. Also I can't access the vertex attributes
using a user-defined attribute because OpenSG doesn't allow me to specify
the attribute indices in the SHL chunk using glBindAttribLocation.

Does this sound correct? If it is this would essentially mean that things
are only currently working on NVIDIA hardware because the driver still binds
the gl_MultiTexCoord0 attribute to "generic" attributes at index/slot 8.

Thanks,
Aron

[1] I have little to no experience with the geometry pump code in OpenSG. So
I could be completely incorrect.

On Tue, Apr 5, 2011 at 12:22 PM, Dirk Reiners <dirk.rein...@gmail.com>wrote:

>
>        Hi Aron,
>
> On 4/5/2011 10:56 AM, Aron Bierbaum wrote:
> > I believe I have made a little bit of progress, but it doesn't make any
> sense.
> > In both the shader.cpp and testSHLEarth_shaderprog.cpp examples if I
> change the
> > sphere geometry to not use display lists things are rendered, but they
> don't
> > appear to be rendered correctly. I am hoping that this may spark some
> ideas for
> > other people.
>
> I can't look at it right now, so I'm not sure if that's the problem, but
> when I
> was working on ATI last they were very picky about aliasing between generic
> and
> specific vertex attributes, so if the main code uses glTexcoord to pass the
> parameters the shader cannot access it using glAttrib and vice versa. AFAIR
> at
> some point we changed OpenSG to use the generic ones, but it's been a
> while. I
> also think we added a flag to switch between the two, check out the
> Geometry
> renderer. Try to change the shader to use the other kind and see if that
> helps.
>
> I might be able to take a look later today, if you can't find it.
>
> Yours
>
>        Dirk
>
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to