本文整理汇总了C#中NewTOAPIA.GL.GraphicsInterface.IndexPointer方法的典型用法代码示例。如果您正苦于以下问题:C# GraphicsInterface.IndexPointer方法的具体用法?C# GraphicsInterface.IndexPointer怎么用?C# GraphicsInterface.IndexPointer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewTOAPIA.GL.GraphicsInterface
的用法示例。
在下文中一共展示了GraphicsInterface.IndexPointer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BeginRender
protected override void BeginRender(GraphicsInterface gi)
{
if (fUseColors && (null != Colors))
{
gi.ClientFeatures.ColorArray.Enable();
gi.ColorPointer(Colors);
}
//if (fUseEdges && (null != Edges))
// gi.EnableClientState(ClientArrayType.EdgeFlagArray);
if (fUseIndices && (null != Indices))
{
gi.ClientFeatures.IndexArray.Enable();
gi.IndexPointer(IndexPointerType.Int, 0, Indices);
}
if (fUseNormals && (null != Normals))
{
gi.ClientFeatures.NormalArray.Enable();
gi.NormalPointer(Normals);
}
if (fUseTexture && (null != TexCoords))
{
gi.ClientFeatures.TextureCoordArray.Enable();
gi.TexCoordPointer(TexCoords);
}
if (fUseVertices && (null != Vertices))
{
gi.ClientFeatures.VertexArray.Enable();
gi.VertexPointer(Vertices);
}
}
示例2: BeginRender
protected override void BeginRender(GraphicsInterface gi)
{
if (fUseColors && (null != Colors))
{
gi.ClientFeatures.ColorArray.Enable();
gi.ColorPointer(Colors);
}
//if (fUseEdges && (null != Edges))
// gi.EnableClientState(ClientArrayType.EdgeFlagArray);
if (fUseNormals && (null != Normals))
{
gi.ClientFeatures.NormalArray.Enable();
gi.NormalPointer(Normals);
}
if (fUseTexture && (fTextureBufferObject != null))
{
gi.ClientFeatures.TextureCoordArray.Enable();
fTextureBufferObject.Bind();
int textureBufferSize = fTextureBufferObject.Size;
gi.TexCoordPointer(2, TexCoordPointerType.Float, 0, IntPtr.Zero);
}
if (fUseVertices && (fVertexBufferObject != null))
{
gi.ClientFeatures.VertexArray.Enable();
fVertexBufferObject.Bind();
int vertexBufferSize = fVertexBufferObject.Size;
gi.VertexPointer(3, VertexPointerType.Float, 0, IntPtr.Zero);
}
if (fUseIndices && (null != Indices))
{
gi.ClientFeatures.IndexArray.Enable();
fIndexBufferObject.Bind();
int indexBufferSize = fIndexBufferObject.Size;
gi.IndexPointer(IndexPointerType.Int, 0, IntPtr.Zero);
}
}