On Tue, 25 Mar 2003 20:02:24 +0000
Keith Whitwell <[EMAIL PROTECTED]> wrote:
> Gareth Hughes wrote:
> > Andreas Stenglein wrote:
> >
> >>
> >> Yes, at least the part with GL_TRIANGLE_STRIP.
> >> In case of "0" you can just return 0, no copying is needed.
> >>
> >> case 0: return 0; break;
> >
> >
> > You're going to do that, just in a slightly different manner:
> >
> > switch (nr) {
> > case 0: ovf = 0; break;
> > case 1: ovf = 1; break;
> > default: ovf = 2; break;
> > }
This is the same as
ovf = MIN2( nr, 2 );
Nice to see in how many creative ways this can be obfuscated. ;-) So it
was just an off-by-one error in the original version, which was
ovf = MIN2( nr-1, 2 );
> > for (i = 0 ; i < ovf ; i++)
> > copy_vertex( rmesa, nr-ovf+i, tmp[i] );
> > return i;
> >
> > When nr == 0, ovf gets set to 0 and you do no iterations of the for
> > loop. You'll then return i, which was initialized to 0.
>
> OK, this isn't perf critical code, so I'll just commit the clearest version.
See above ;-)
>
> This is all queued up now pending the merge completion, which is also waiting
> on me...
>
> Keith
>
------------ __\|/__ ___ ___ -------------------------
Felix ___\_e -_/___/ __\___/ __\_____ You can do anything,
K�hling (_____\�/____/ /_____/ /________) just not everything
[EMAIL PROTECTED] \___/ \___/ U at the same time.
-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel