Home > 未分类 > 多流渲染的SetStreamSource()



   VertexElement[] elemTex = new VertexElement[] {
    new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0),
    new VertexElement(0, 12, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Normal, 0),
    new VertexElement(0, 24, DeclarationType.Color, DeclarationMethod.Default, DeclarationUsage.Color, 0),
    new VertexElement(1, 0, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0),

device.SetStreamSource(0, m_VBGeo, 0, CustomVertex.PositionNormalColored.StrideSize);
device.SetStreamSource(1, m_VBTex, 0, sizeof(float) * 2);
device.SetStreamSource(0, m_VBGeo, 0);
device.SetStreamSource(1, m_VBTex, 0);
Categories: 未分类
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: