Aiv.Fast2D.Mesh.Update C# (CSharp) Метод

Update() публичный Метод

public Update ( ) : void
Результат void
        public void Update()
        {
            this.UpdateVertex();
            this.UpdateUV();
            this.UpdateVertexColor();
        }

Usage Example

Пример #1
0
        public PostProcessingEffect(string fragmentShader, string fragmentShaderObsolete = null, bool useDepth = false, int depthSize = 16)
        {
            string[] attribs = null;
            if (fragmentShaderObsolete != null)
            {
                attribs = new string[] { "screen_vertex", "screen_uv" };
            }
            screenMesh = new Mesh(new Shader(vertexShader, fragmentShader, vertexShaderObsolete, fragmentShaderObsolete, attribs));
            screenMesh.hasVertexColors = false;

            this.useDepth  = useDepth;
            this.depthSize = depthSize;

            screenMesh.v = new float[]
            {
                -1, 1,
                1, 1,
                1, -1,

                1, -1,
                -1, -1,
                -1, 1
            };

            screenMesh.uv = new float[]
            {
                0, 1,
                1, 1,
                1, 0,

                1, 0,
                0, 0,
                0, 1
            };

            // upload both vertices and uvs
            screenMesh.Update();
            screenMesh.noMatrix = true;

            // enabled by default
            this.enabled = true;
        }
All Usage Examples Of Aiv.Fast2D.Mesh::Update