Aiv.Fast2D.InstancedSprite.SetupInstances C# (CSharp) Method

SetupInstances() private method

private SetupInstances ( ) : void
return void
        private void SetupInstances()
        {
            this.hasVertexColors = false;

            this.shader = instancedSpriteShader;

            positionsData = new float[2 * this.instances];

            scalesData = new float[2 * this.instances];
            // fill scalesData with 1's
            for (int i = 0; i < scalesData.Length; i++)
            {
                scalesData[i] = 1f;
            }

            additiveColorData = new float[4 * this.instances];

            multiplyColorData = new float[4 * this.instances];
            for (int i = 0; i < multiplyColorData.Length; i++)
            {
                multiplyColorData[i] = 1f;
            }

            positionsBuffer = NewFloatBuffer(2, 2, positionsData, 1);
            scalesBuffer = NewFloatBuffer(3, 2, scalesData, 1);
            additiveColorBuffer = NewFloatBuffer(4, 4, additiveColorData, 1);
            multiplyColorBuffer = NewFloatBuffer(5, 4, multiplyColorData, 1);
        }