Example #1
0
            public void BackupRenderTexture(int maxTextures, TextureMeta from)
            {
                ClearRenderTexturesTill(maxTextures);

                if (maxTextures <= 0)
                {
                    return;
                }

                if (rTex.Count < maxTextures)
                {
                    rTex.Add(new RenderTextureBackup(from, _order));
                }
                else
                {
                    QcSharp.MoveFirstToLast(rTex).Set(from, _order);
                }

                _order++;
            }
Example #2
0
            public void BackupTexture2D(int maxTextures, TextureMeta id)
            {
                QcSharp.SetMaximumLength(tex2D, maxTextures);

                if (maxTextures <= 0)
                {
                    return;
                }

                var copyPix = (Color[])id.Pixels.Clone();

                if (tex2D.Count < maxTextures)
                {
                    tex2D.Add(new Texture2DBackup(copyPix, id, _order));
                }
                else
                {
                    QcSharp.MoveFirstToLast(tex2D).Set(copyPix, id, _order);
                }



                _order++;
            }