Class for handling Sparse Textures.

Наследование: Texture
Пример #1
0
    static void SparseTexture_tileHeight(JSVCall vc)
    {
        UnityEngine.SparseTexture _this = (UnityEngine.SparseTexture)vc.csObj;
        var result = _this.tileHeight;

        JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
    }
 static public int get_isCreated(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.SparseTexture self = (UnityEngine.SparseTexture)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.isCreated);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Пример #3
0
    static void SparseTexture_isCreated(JSVCall vc)
    {
        UnityEngine.SparseTexture _this = (UnityEngine.SparseTexture)vc.csObj;
        var result = _this.isCreated;

        JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
    }
 static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.SparseTexture o;
         if (argc == 7)
         {
             System.Int32 a1;
             checkType(l, 3, out a1);
             System.Int32 a2;
             checkType(l, 4, out a2);
             UnityEngine.TextureFormat a3;
             checkEnum(l, 5, out a3);
             System.Int32 a4;
             checkType(l, 6, out a4);
             System.Boolean a5;
             checkType(l, 7, out a5);
             o = new UnityEngine.SparseTexture(a1, a2, a3, a4, a5);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (matchType(l, "ctor__Int32__Int32__TextureFormat__Int32", argc, 2, typeof(int), typeof(int), typeof(UnityEngine.TextureFormat), typeof(int)))
         {
             System.Int32 a1;
             checkType(l, 3, out a1);
             System.Int32 a2;
             checkType(l, 4, out a2);
             UnityEngine.TextureFormat a3;
             checkEnum(l, 5, out a3);
             System.Int32 a4;
             checkType(l, 6, out a4);
             o = new UnityEngine.SparseTexture(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (matchType(l, "ctor__Int32__Int32__GraphicsFormat__Int32", argc, 2, typeof(int), typeof(int), typeof(UnityEngine.Experimental.Rendering.GraphicsFormat), typeof(int)))
         {
             System.Int32 a1;
             checkType(l, 3, out a1);
             System.Int32 a2;
             checkType(l, 4, out a2);
             UnityEngine.Experimental.Rendering.GraphicsFormat a3;
             checkEnum(l, 5, out a3);
             System.Int32 a4;
             checkType(l, 6, out a4);
             o = new UnityEngine.SparseTexture(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #5
0
 static public int get_isCreated(IntPtr l)
 {
     try {
         UnityEngine.SparseTexture self = (UnityEngine.SparseTexture)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.isCreated);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_isCreated(IntPtr l)
 {
     try {
         UnityEngine.SparseTexture self = (UnityEngine.SparseTexture)checkSelf(l);
         pushValue(l, self.isCreated);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Пример #7
0
        public SparseTexture(int width, int height, GraphicsFormat format, int mipCount)
        {
            bool flag = !base.ValidateFormat(format, FormatUsage.Sample);

            if (!flag)
            {
                bool flag2 = !this.ValidateSize(width, height, format);
                if (!flag2)
                {
                    SparseTexture.Internal_Create(this, width, height, format, mipCount);
                }
            }
        }
Пример #8
0
        public SparseTexture(int width, int height, TextureFormat textureFormat, int mipCount, bool linear)
        {
            bool flag = !base.ValidateFormat(textureFormat);

            if (!flag)
            {
                SparseTexture.ValidateIsNotCrunched(textureFormat);
                GraphicsFormat graphicsFormat = GraphicsFormatUtility.GetGraphicsFormat(textureFormat, !linear);
                bool           flag2          = !this.ValidateSize(width, height, graphicsFormat);
                if (!flag2)
                {
                    SparseTexture.Internal_Create(this, width, height, graphicsFormat, mipCount);
                }
            }
        }
Пример #9
0
 static public int UnloadTile(IntPtr l)
 {
     try {
         UnityEngine.SparseTexture self = (UnityEngine.SparseTexture)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         self.UnloadTile(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int UnloadTile(IntPtr l)
 {
     try{
         UnityEngine.SparseTexture self = (UnityEngine.SparseTexture)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         self.UnloadTile(a1, a2, a3);
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
        /// <summary>
        /// Write the specified value using the writer.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="writer">Writer.</param>
        public override void Write(object value, ISaveGameWriter writer)
        {
            UnityEngine.SparseTexture sparseTexture = (UnityEngine.SparseTexture)value;
            writer.WriteProperty("width", sparseTexture.width);
            writer.WriteProperty("height", sparseTexture.height);
            writer.WriteProperty("dimension", sparseTexture.dimension);
            writer.WriteProperty("filterMode", sparseTexture.filterMode);
            writer.WriteProperty("anisoLevel", sparseTexture.anisoLevel);
            writer.WriteProperty("wrapMode", sparseTexture.wrapMode);
#if UNITY_2017_1_OR_NEWER
            writer.WriteProperty("wrapModeU", sparseTexture.wrapModeU);
            writer.WriteProperty("wrapModeV", sparseTexture.wrapModeV);
            writer.WriteProperty("wrapModeW", sparseTexture.wrapModeW);
#endif
            writer.WriteProperty("mipMapBias", sparseTexture.mipMapBias);
            writer.WriteProperty("name", sparseTexture.name);
            writer.WriteProperty("hideFlags", sparseTexture.hideFlags);
        }
Пример #12
0
 static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.SparseTexture o;
         if (argc == 5)
         {
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             UnityEngine.TextureFormat a3;
             checkEnum(l, 4, out a3);
             System.Int32 a4;
             checkType(l, 5, out a4);
             o = new UnityEngine.SparseTexture(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 6)
         {
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             UnityEngine.TextureFormat a3;
             checkEnum(l, 4, out a3);
             System.Int32 a4;
             checkType(l, 5, out a4);
             System.Boolean a5;
             checkType(l, 6, out a5);
             o = new UnityEngine.SparseTexture(a1, a2, a3, a4, a5);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #13
0
 static public int UpdateTileRaw(IntPtr l)
 {
     try {
         UnityEngine.SparseTexture self = (UnityEngine.SparseTexture)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         System.Byte[] a4;
         checkArray(l, 5, out a4);
         self.UpdateTileRaw(a1, a2, a3, a4);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 public static int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.SparseTexture o;
         if(argc==5){
             System.Int32 a1;
             checkType(l,2,out a1);
             System.Int32 a2;
             checkType(l,3,out a2);
             UnityEngine.TextureFormat a3;
             checkEnum(l,4,out a3);
             System.Int32 a4;
             checkType(l,5,out a4);
             o=new UnityEngine.SparseTexture(a1,a2,a3,a4);
             pushValue(l,o);
             return 1;
         }
         else if(argc==6){
             System.Int32 a1;
             checkType(l,2,out a1);
             System.Int32 a2;
             checkType(l,3,out a2);
             UnityEngine.TextureFormat a3;
             checkEnum(l,4,out a3);
             System.Int32 a4;
             checkType(l,5,out a4);
             System.Boolean a5;
             checkType(l,6,out a5);
             o=new UnityEngine.SparseTexture(a1,a2,a3,a4,a5);
             pushValue(l,o);
             return 1;
         }
         LuaDLL.luaL_error(l,"New object failed.");
         return 0;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
Пример #15
0
 static public int ctor__Int32__Int32__GraphicsFormat__Int32_s(IntPtr l)
 {
     try {
         UnityEngine.SparseTexture o;
         System.Int32 a1;
         checkType(l, 1, out a1);
         System.Int32 a2;
         checkType(l, 2, out a2);
         UnityEngine.Experimental.Rendering.GraphicsFormat a3;
         checkEnum(l, 3, out a3);
         System.Int32 a4;
         checkType(l, 4, out a4);
         o = new UnityEngine.SparseTexture(a1, a2, a3, a4);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int UpdateTile(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.SparseTexture self = (UnityEngine.SparseTexture)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         UnityEngine.Color32[] a4;
         checkArray(l, 5, out a4);
         self.UpdateTile(a1, a2, a3, a4);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
    static public int constructor(IntPtr l)
    {
        int argc = LuaDLL.lua_gettop(l);

        UnityEngine.SparseTexture o;
        if (argc == 5)
        {
            System.Int32 a1;
            checkType(l, 2, out a1);
            System.Int32 a2;
            checkType(l, 3, out a2);
            UnityEngine.TextureFormat a3;
            checkEnum(l, 4, out a3);
            System.Int32 a4;
            checkType(l, 5, out a4);
            o = new UnityEngine.SparseTexture(a1, a2, a3, a4);
            pushObject(l, o);
            return(1);
        }
        else if (argc == 6)
        {
            System.Int32 a1;
            checkType(l, 2, out a1);
            System.Int32 a2;
            checkType(l, 3, out a2);
            UnityEngine.TextureFormat a3;
            checkEnum(l, 4, out a3);
            System.Int32 a4;
            checkType(l, 5, out a4);
            System.Boolean a5;
            checkType(l, 6, out a5);
            o = new UnityEngine.SparseTexture(a1, a2, a3, a4, a5);
            pushObject(l, o);
            return(1);
        }
        LuaDLL.luaL_error(l, "New object failed.");
        return(0);
    }
Пример #18
0
 static public int ctor__Int32__Int32__TextureFormat__Int32__Boolean_s(IntPtr l)
 {
     try {
         UnityEngine.SparseTexture o;
         System.Int32 a1;
         checkType(l, 1, out a1);
         System.Int32 a2;
         checkType(l, 2, out a2);
         UnityEngine.TextureFormat a3;
         checkEnum(l, 3, out a3);
         System.Int32 a4;
         checkType(l, 4, out a4);
         System.Boolean a5;
         checkType(l, 5, out a5);
         o = new UnityEngine.SparseTexture(a1, a2, a3, a4, a5);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #19
0
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.SparseTexture o;
     if (matchType(l, 1, typeof(System.Int32), typeof(System.Int32), typeof(UnityEngine.TextureFormat), typeof(System.Int32)))
     {
         System.Int32 a1;
         checkType(l, 1, out a1);
         System.Int32 a2;
         checkType(l, 2, out a2);
         UnityEngine.TextureFormat a3;
         checkEnum(l, 3, out a3);
         System.Int32 a4;
         checkType(l, 4, out a4);
         o = new UnityEngine.SparseTexture(a1, a2, a3, a4);
         pushObject(l, o);
         return(1);
     }
     else if (matchType(l, 1, typeof(System.Int32), typeof(System.Int32), typeof(UnityEngine.TextureFormat), typeof(System.Int32), typeof(System.Boolean)))
     {
         System.Int32 a1;
         checkType(l, 1, out a1);
         System.Int32 a2;
         checkType(l, 2, out a2);
         UnityEngine.TextureFormat a3;
         checkEnum(l, 3, out a3);
         System.Int32 a4;
         checkType(l, 4, out a4);
         System.Boolean a5;
         checkType(l, 5, out a5);
         o = new UnityEngine.SparseTexture(a1, a2, a3, a4, a5);
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.SparseTexture sparseTexture = (UnityEngine.SparseTexture)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "width":
                    sparseTexture.width = reader.ReadProperty <System.Int32>();
                    break;

                case "height":
                    sparseTexture.height = reader.ReadProperty <System.Int32>();
                    break;

                case "dimension":
                    sparseTexture.dimension = reader.ReadProperty <UnityEngine.Rendering.TextureDimension>();
                    break;

                case "filterMode":
                    sparseTexture.filterMode = reader.ReadProperty <UnityEngine.FilterMode>();
                    break;

                case "anisoLevel":
                    sparseTexture.anisoLevel = reader.ReadProperty <System.Int32>();
                    break;

                case "wrapMode":
                    sparseTexture.wrapMode = reader.ReadProperty <UnityEngine.TextureWrapMode>();
                    break;

                case "wrapModeU":
#if UNITY_2017_1_OR_NEWER
                    sparseTexture.wrapModeU = reader.ReadProperty <UnityEngine.TextureWrapMode>();
#else
                    reader.ReadProperty <UnityEngine.TextureWrapMode>();
#endif
                    break;

                case "wrapModeV":
#if UNITY_2017_1_OR_NEWER
                    sparseTexture.wrapModeV = reader.ReadProperty <UnityEngine.TextureWrapMode>();
#else
                    reader.ReadProperty <UnityEngine.TextureWrapMode>();
#endif
                    break;

                case "wrapModeW":
#if UNITY_2017_1_OR_NEWER
                    sparseTexture.wrapModeW = reader.ReadProperty <UnityEngine.TextureWrapMode>();
#else
                    reader.ReadProperty <UnityEngine.TextureWrapMode>();
#endif
                    break;

                case "mipMapBias":
                    sparseTexture.mipMapBias = reader.ReadProperty <System.Single>();
                    break;

                case "name":
                    sparseTexture.name = reader.ReadProperty <System.String>();
                    break;

                case "hideFlags":
                    sparseTexture.hideFlags = reader.ReadProperty <UnityEngine.HideFlags>();
                    break;
                }
            }
        }
 static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.SparseTexture o;
         if (argc == 5)
         {
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             UnityEngine.TextureFormat a3;
             a3 = (UnityEngine.TextureFormat)LuaDLL.luaL_checkinteger(l, 4);
             System.Int32 a4;
             checkType(l, 5, out a4);
             o = new UnityEngine.SparseTexture(a1, a2, a3, a4);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 6)
         {
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             UnityEngine.TextureFormat a3;
             a3 = (UnityEngine.TextureFormat)LuaDLL.luaL_checkinteger(l, 4);
             System.Int32 a4;
             checkType(l, 5, out a4);
             System.Boolean a5;
             checkType(l, 6, out a5);
             o = new UnityEngine.SparseTexture(a1, a2, a3, a4, a5);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Пример #22
0
 private static void Internal_Create([Writable] SparseTexture mono, int width, int height, TextureFormat format, int mipCount, bool linear)
 {
     throw new NotImplementedException("なにこれ");
 }
Пример #23
0
 private static extern void Internal_Create([Writable] SparseTexture mono, int width, int height, TextureFormat format, int mipCount, bool linear);
Пример #24
0
 public SparseTexture(int width, int height, TextureFormat format, int mipCount)
 {
     SparseTexture.Internal_Create(this, width, height, format, mipCount, false);
 }
Пример #25
0
 public SparseTexture(int width, int height, TextureFormat format, int mipCount, bool linear)
 {
     SparseTexture.Internal_Create(this, width, height, format, mipCount, linear);
 }
 static public int get_tileHeight(IntPtr l)
 {
     UnityEngine.SparseTexture o = (UnityEngine.SparseTexture)checkSelf(l);
     pushValue(l, o.tileHeight);
     return(1);
 }
Пример #27
0
 extern private static void Internal_Create([Writable] SparseTexture mono, int width, int height, GraphicsFormat format, int mipCount);
 static public int get_isCreated(IntPtr l)
 {
     UnityEngine.SparseTexture o = (UnityEngine.SparseTexture)checkSelf(l);
     pushValue(l, o.isCreated);
     return(1);
 }