|
From: Dair G. <da...@re...> - 2004-06-18 21:17:33
|
Keith Wiley wrote:
>Hmmm, okay, so you're not referring to the vertex or triangle
>attributes but the attributes of the entire trimesh, called
>triMeshAttributeSet. I'll look at that. Thanks.
Yes, that's one way to do it - store a reference to the texture object
within the TriMesh's attribute set as a whole.
The other way to do it is to put both the texture and the TriMesh in the
same group.
A group acts as a kind of "scope delimiter" for the state changes within
it, so that if you have:
Group1
TriMesh1
Group2
TextureA
TriMesh2
TriMesh3
Group3
TextureB
TriMesh4
Then TriMesh 1 will be rendered without a exture, TriMesh2 and 3 will
have TextureA, and TriMesh4 will have TextureB.
If a TriMesh has a texture in its own attribute set, that overrides the
"current" (=3D=3Dlast processed texture in the current group or a parent
group) texture - if it doesn't, it's drawn in the current texture if
any.
-dair
___________________________________________________
mailto:dair+refnum.com http://www.refnum.com/
|