Exemplo n.º 1
0
 public static void Initialize()
 {
     if (Processor.Architecture == ProcessorArchitecture.X64)
     {
         SquishInterfaceX64.SquishInitialize();
     }
     else
     {
         SquishInterfaceX86.SquishInitialize();
     }
 }
Exemplo n.º 2
0
        private static unsafe void CallDecompressImage(byte[] rgba, int width, int height, byte[] blocks, int flags, ProgressFn progressFn)
        {
            fixed(byte *numRef = rgba)
            {
                fixed(byte *numRef2 = blocks)
                {
                    if (Processor.Architecture == ProcessorArchitecture.X64)
                    {
                        SquishInterfaceX64.SquishDecompressImage(numRef, width, height, numRef2, flags, progressFn);
                    }
                    else
                    {
                        SquishInterfaceX86.SquishDecompressImage(numRef, width, height, numRef2, flags, progressFn);
                    }
                }
            }

            GC.KeepAlive(progressFn);
        }