D
DF
I'm trying to set the attributebuffer.AttributeID using vb.net.I know how to
lock the attribute buffer. I know how to set the attribute range. I think
I've even assigned the attribute table. What I can't seem to figure out is
how to set the attribute.ID for the face in the mesh.
Sample code:
Dim AR As DX3D.AttributeRange()
ReDim AR(2)
AR(0).AttributeId = 0
AR(1).AttributeId = 1
World.SetAttributeTable(AR)
Dim GS As DX.GraphicsStream = World.LockAttributeBuffer(Nothing)
For i As Integer = 0 To World.NumberFaces - 1
If Rnd() < 0.5 Then
'*** This is where i want to randomly set the attribute to 0 or 1
for example ***
'GS(i) = AR(1)
End If
Next i
World.UnlockAttributeBuffer()
Does anyone have any information that'll help me? Thanks
D
lock the attribute buffer. I know how to set the attribute range. I think
I've even assigned the attribute table. What I can't seem to figure out is
how to set the attribute.ID for the face in the mesh.
Sample code:
Dim AR As DX3D.AttributeRange()
ReDim AR(2)
AR(0).AttributeId = 0
AR(1).AttributeId = 1
World.SetAttributeTable(AR)
Dim GS As DX.GraphicsStream = World.LockAttributeBuffer(Nothing)
For i As Integer = 0 To World.NumberFaces - 1
If Rnd() < 0.5 Then
'*** This is where i want to randomly set the attribute to 0 or 1
for example ***
'GS(i) = AR(1)
End If
Next i
World.UnlockAttributeBuffer()
Does anyone have any information that'll help me? Thanks
D