lights in B3D
Boris Gaertner
Boris.Gaertner at gmx.net
Sun Nov 30 11:34:16 UTC 2003
From: Stéphane Rollandin <lecteur at zogotounga.net>
<snip>
> I found that the two demo examples:
>
> B3DDemoSurfaces example2
> B3DDemoSurfaces example3
>
> give a dark display (in a 3.6-5424 image). I guess there is something
wrong
> there,
</snip>
The problem is that a method in the instance protocol of
B3DIndexedMesh was changed. Four years ago it read:
vertexNormals
^vtxNormals ifNil:[vtxNormals _ self computeVertexNormals].
Now it is:
vertexNormals
^vtxNormals
The new method does not compute missing vertex normals.
As a consequence, we cannot any longer write
mesh := B3DIndexedTriangleMesh new.
mesh vertices: vtx contents;
texCoords: tex contents;
faces: faces.
mesh vertexNormals.
when we set up a mesh, we have to write
mesh := B3DIndexedTriangleMesh new.
mesh vertices: vtx contents;
texCoords: tex contents;
faces: faces.
mesh vertexNormals: mesh computeVertexNormals.
For your convenience I attached a change file. Please
file it in. It will give color to the examples you mentioned.
Thank you a lot for bringing my attention to this bug.
Boris.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: B3DTutorialFix.zip
Type: application/x-zip-compressed
Size: 1752 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031130/7abd05c2/B3DTutorialFix.bin
More information about the Squeak-dev
mailing list
|