コード例 #1
0
        public void Draw(int vertexCount, int instanceCount, int firstVertex, int firstInstance)
        {
            this.gl_InstanceIndex = firstInstance;
            this.CurrentStage     = StageType.InputAssembler;

            for (int instanceNum = 0; instanceNum < instanceCount; instanceNum++)
            {
                this.gl_VertexIndex = firstVertex;
                while (vertexCount >= PrimitiveLength)
                {
                    for (int i = 0; i < PrimitiveLength; i++)
                    {
                        this.PrimitiveVertexIndex = i;
                        m_CompiledPipelineProgram.VertexShader();
                        this.gl_VertexIndex++;
                    }
                    RasterizeTriangle();
                    vertexCount -= this.PrimitiveLength;
                }
                this.gl_InstanceIndex++;
            }
        }