Ejemplo n.º 1
0
        public static TextureFormat ToTextureFormat(Alt.Sketch.PixelFormat format)
        {
            switch (format)
            {
            case Alt.Sketch.PixelFormat.Format8bppAlpha:
                return(TextureFormat.Alpha8);

            case Alt.Sketch.PixelFormat.Format24bppRgb:
                return(TextureFormat.RGB24);

            case Alt.Sketch.PixelFormat.Format32bppArgb:
                return(TextureFormat.RGBA32);
            }

            return(TextureFormat.RGBA32);
        }
Ejemplo n.º 2
0
        public static RenderTextureFormat ToRenderTextureFormat(Alt.Sketch.PixelFormat format)
        {
            switch (format)
            {
            case Alt.Sketch.PixelFormat.Format8bppAlpha:
                return(RenderTextureFormat.Default);

            case Alt.Sketch.PixelFormat.Format24bppRgb:
                return(RenderTextureFormat.Default);

            case Alt.Sketch.PixelFormat.Format32bppArgb:
                return(RenderTextureFormat.ARGB32);
            }

            return(RenderTextureFormat.Default);
        }
Ejemplo n.º 3
0
 protected override Alt.Sketch.Rendering.Texture CreateRenderTexture(int width, int height, Alt.Sketch.PixelFormat format)
 {
     return(new Unity_RenderTexture(this, width, height, format));
 }