[Mesa-dev] how to fix progs/demo/geartrain.c?

Christian Authmann christian at authmann.de
Sun Aug 8 04:51:55 PDT 2010


Hi,

thanks for your comments so far. I've rebased my fixes on the latest git
code.

Here's three patches (which I release under the license of the original
source files):

geartrain_1_3_loading.patch
improves the loading routines. If you like pain, take a close look at
the strset() implementation and figure out what happens when it's called
with ch = 0. Or, for that matter, called on an uninitialized buffer. Ouch.

geartrain_2_3_gears.patch
fixes the geometry on beveled gears, adds some missing normals and makes
slight corrections to others, sets everything to FLAT shading as that
was obviously intended by the author.
(I just noticed I'm now setting some normals twice, but that doesn't hurt.)

geartrain_3_3_backfaces.patch
switches part of the geometry around to render the outer faces of the
gears as backfaces.


Please let me know if you either require further changes to these
patches or any kind of formality hoops I should jump through for submitting.


greetings,
Christian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: geartrain_1_3_loading.patch
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100808/4d6a665f/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: geartrain_2_3_gears.patch
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100808/4d6a665f/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: geartrain_3_3_backfaces.patch
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100808/4d6a665f/attachment.txt>


More information about the mesa-dev mailing list