UpdateExternalTexture() private méthode

private UpdateExternalTexture ( IntPtr nativeTex ) : void
nativeTex IntPtr
Résultat void
 static public int UpdateExternalTexture(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.Texture2D self = (UnityEngine.Texture2D)checkSelf(l);
         System.IntPtr         a1;
         checkType(l, 2, out a1);
         self.UpdateExternalTexture(a1);
         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 UpdateExternalTexture(IntPtr l)
 {
     try {
         UnityEngine.Texture2D self = (UnityEngine.Texture2D)checkSelf(l);
         System.IntPtr         a1;
         checkType(l, 2, out a1);
         self.UpdateExternalTexture(a1);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #3
0
 static int QPYX_UpdateExternalTexture_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 2);
         UnityEngine.Texture2D QPYX_obj_YXQP  = (UnityEngine.Texture2D)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.Texture2D));
         System.IntPtr         QPYX_arg0_YXQP = ToLua.CheckIntPtr(L_YXQP, 2);
         QPYX_obj_YXQP.UpdateExternalTexture(QPYX_arg0_YXQP);
         return(0);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemple #4
0
 static int UpdateExternalTexture(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.Texture2D obj  = (UnityEngine.Texture2D)ToLua.CheckObject(L, 1, typeof(UnityEngine.Texture2D));
         System.IntPtr         arg0 = ToLua.CheckIntPtr(L, 2);
         obj.UpdateExternalTexture(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 public static int UpdateExternalTexture_wrap(long L)
 {
     try
     {
         long nThisPtr             = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityEngine.Texture2D obj = get_obj(nThisPtr);
         IntPtr arg0 = new IntPtr();
         FCLibHelper.fc_get_void_ptr(L, 0, ref arg0);
         obj.UpdateExternalTexture(arg0);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
Exemple #6
0
    static int UpdateExternalTexture(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.Texture2D.UpdateExternalTexture");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.Texture2D obj  = (UnityEngine.Texture2D)ToLua.CheckObject(L, 1, typeof(UnityEngine.Texture2D));
            System.IntPtr         arg0 = ToLua.CheckIntPtr(L, 2);
            obj.UpdateExternalTexture(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static Texture2D CreateDecoderTexture(int Width,int Height)
    {
        //	create a texture via java's low level gl access
        AndroidJavaClass GLES20 = new AndroidJavaClass ("android.opengl.GLES20");
        int[] Textures = new int[1];
        GLES20.CallStatic ("glGenTextures", 1, Textures, 0 );
        if (!glGetError ("glGenTextures"))
            return null;
        if (Textures [0] == 0) {
            Log ("Failed to generate texture");
            return null;
        }
        Texture2D UnityTexture = new Texture2D (Width,Height);
        IntPtr TextureId = (IntPtr)Textures [0];
        UnityTexture.UpdateExternalTexture ( TextureId );
        return UnityTexture;
        /*
        GLES20.CallStatic                  glBindTexture(GL_TEXTURE_EXTERNAL_OES, textureId);
                          glTexParameterf(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
                          glTexParameterf(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
                          glTexParameterf(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
                          glTexParameterf(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
                          glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);

        */
    }