On Wed, 26 Nov 2003 07:49:21 +0200 Ville Syrjälä <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 25, 2003 at 10:17:46PM +0100, Felix Kühling wrote: > > Hi, > > > > I'm looking into the various templates in Mesa/src/tnl_dd as I'm trying > > to port the savage driver to current Mesa. I was wondering what the > > HAVE_HW_FLAT_SHADE macro is doing? It only appears in t_dd_unfilled.h > > and it looks like it's doing the exact opposite of what it says: > > > > if ((ctx->_TriangleCaps & DD_FLATSHADE) && HAVE_HW_FLATSHADE) { > > /* ... save colors and copy from last vertex ... */ > > } > > > > I believe it should be: > > > > if ((ctx->_TriangleCaps & DD_FLATSHADE) && !HAVE_HW_FLATSHADE) { > > /* ... save colors and copy from last vertex ... */ > > } > > > > Am I missing something? > > I think so. For hardware without flatshading the copy is done in > t_dd_tritmp.h and so t_dd_unfilled.h must not do it again. But since > t_dd_unfilled uses points and lines the colors need to be copied even for > hardware with flatshading. Ok. I was just about to ask another stupid question when I finally understood it. ;-) The first part about not copying vertex colors twice was clear. It just took me a while to see that hardware-flat-shaded lines would use the wrong colors on some line segments. Thanks for clearing this up. > > -- > Ville Syrjälä > [EMAIL PROTECTED] > http://www.sci.fi/~syrjala/ ------------ __\|/__ ___ ___ ------------------------- 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: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel