On 1/15/07, Brian Paul <[EMAIL PROTECTED]> wrote:
> Oliver McFadden wrote:
> > I'm also a little confused on how to use generic vertex attributes now. I
> guess
> > it should just be a case of using attributes >= 16 in both the program's
> code,
> > and the vertex program, correct?
>
> Unfortunately, the ARB kind of screwed over the app developer when they
> made aliasing optional in the GL_ARB_vertex_program extension (I argued
> for it, BTW).  Depending on whose OpenGL you're using, you may or may
> not get aliasing.
>
> The safe thing to do is assume that attributes do alias and avoid
> conflicts.  For example, if you need color, texcoord and a few generic
> attributes.  Be aware that generic attribs 3 and 8 will correspond to
> the color and texcoord attributes, so you should avoid using them as
> generics.

I'm using attributes 8, 9, 10, and 12, 13. They shouldn't create any conflicts,
they only alias the texcoords for textures that I never use, so I'm not really
sure what's going on...

> > Anyway, here is a small patch (more of a hack) that I did to fix the old
> > behaviour, but this is not the correct solution. Unfortionally I don't
> really
> > know the depths of Mesa3d well enough to know in detail what needs to be
> fixed.
> >
> > diff --git a/src/mesa/shader/arbprogparse.c
> b/src/mesa/shader/arbprogparse.c
> > index de63c50..9f4a2dc 100644
> > --- a/src/mesa/shader/arbprogparse.c
> > +++ b/src/mesa/shader/arbprogparse.c
> > @@ -1542,7 +1542,7 @@ parse_attrib_binding(GLcontext * ctx, GLubyte **
> inst,
> >                     * attributes.
> >                     */
> >                    if (attrib > 0)
> > -                     *inputReg = attrib + VERT_ATTRIB_GENERIC0;
> > +                     *inputReg = attrib;
> >                 }
> >              }
> >              break;
>
> That'll break some things.  If you've got a test program that exhibits a
> problem, please file a bug report.  I'll look into it then.

I'll try to get a small test program that demonstrates this problem in the next
few days, but I'm not even really sure what is causing the problem, so that
might be harder than it sounds.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to