示例#1
0
        private void RenderVertex(
            int index, CIwModelBlockVerts verts, CIwModelBlockIndGroups indGroups, CIwModelBlockCols colors)
        {
            if (colors != null && indGroups.HasColors)
            {
                GL.Color4(colors.Colors[indGroups.GetColor(this.m_IGIDs[index])]);
            }

            if (this.IsTextured)
            {
                GL.TexCoord2(this.m_U0[index * 2] / 4096.0f, this.m_U0[index * 2 + 1] / 4096.0f);
            }

            GL.Vertex3(verts.Verts[indGroups.GetVert(this.m_IGIDs[index])]);
        }
示例#2
0
        /// <summary>
        /// The render.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        /// <param name="flags">
        /// The flags.
        /// </param>
        /// <param name="verts">
        /// The verts.
        /// </param>
        /// <param name="indGroups">
        /// The ind groups.
        /// </param>
        /// <param name="colors">
        /// The colors.
        /// </param>
        public void Render(
            CIwModel model, uint flags, CIwModelBlockVerts verts, CIwModelBlockIndGroups indGroups, CIwModelBlockCols colors)
        {
            if (0 == (this.m_Flags & IW_MODEL_PRIM_QUAD_F))
            {
                // Triangle
                this.RenderVertex(2, verts, indGroups, colors);
                this.RenderVertex(1, verts, indGroups, colors);
                this.RenderVertex(0, verts, indGroups, colors);
            }
            else
            {
                this.RenderVertex(3, verts, indGroups, colors);
                this.RenderVertex(1, verts, indGroups, colors);
                this.RenderVertex(0, verts, indGroups, colors);

                this.RenderVertex(2, verts, indGroups, colors);
                this.RenderVertex(3, verts, indGroups, colors);
                this.RenderVertex(0, verts, indGroups, colors);
            }
        }
示例#3
0
        /// <summary>
        /// The render.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        /// <param name="flags">
        /// The flags.
        /// </param>
        /// <param name="verts">
        /// The verts.
        /// </param>
        /// <param name="indGroups">
        /// The ind groups.
        /// </param>
        /// <param name="colors">
        /// The colors.
        /// </param>
        public void Render(
			CIwModel model, uint flags, CIwModelBlockVerts verts, CIwModelBlockIndGroups indGroups, CIwModelBlockCols colors)
        {
            if (0 == (this.m_Flags & IW_MODEL_PRIM_QUAD_F))
            {
                // Triangle
                this.RenderVertex(2, verts, indGroups, colors);
                this.RenderVertex(1, verts, indGroups, colors);
                this.RenderVertex(0, verts, indGroups, colors);
            }
            else
            {
                this.RenderVertex(3, verts, indGroups, colors);
                this.RenderVertex(1, verts, indGroups, colors);
                this.RenderVertex(0, verts, indGroups, colors);

                this.RenderVertex(2, verts, indGroups, colors);
                this.RenderVertex(3, verts, indGroups, colors);
                this.RenderVertex(0, verts, indGroups, colors);
            }
        }
示例#4
0
        private void RenderVertex(
			int index, CIwModelBlockVerts verts, CIwModelBlockIndGroups indGroups, CIwModelBlockCols colors)
        {
            if (colors != null && indGroups.HasColors)
            {
                GL.Color4(colors.Colors[indGroups.GetColor(this.m_IGIDs[index])]);
            }

            if (this.IsTextured)
            {
                GL.TexCoord2(this.m_U0[index * 2] / 4096.0f, this.m_U0[index * 2 + 1] / 4096.0f);
            }

            GL.Vertex3(verts.Verts[indGroups.GetVert(this.m_IGIDs[index])]);
        }