VertexPointer() public method

public VertexPointer ( Point3D pointer ) : void
pointer Point3D
return void
Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }