Attribute ID/Attribute Buffer

  • Thread starter Thread starter DF
  • Start date Start date
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
 
Any help at all? Please. Please.

I'm not a student.
I've read all the documentation ad nauseum.
Seems like it should be such a simple thing but I can't figure it out.

Thanks,

D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top