GetNativeTextureID() private method

private GetNativeTextureID ( ) : int
return int
 public static void WriteOnTexture(Texture textureToWrite, string text, string fontName, DFTAlignment alignment, int fontSize, int width, int height)
 {
     if(width==0||height==0||fontSize==0)
     {
         Debug.Log("Please check arguments.");
     }
     else
     {
         _writeOnGLTexture(textureToWrite.GetNativeTextureID(),text,fontName,(int)alignment,fontSize,width,height);
     }
 }
コード例 #2
0
	static public int GetNativeTextureID(IntPtr l) {
		try {
			UnityEngine.Texture self=(UnityEngine.Texture)checkSelf(l);
			var ret=self.GetNativeTextureID();
			pushValue(l,ret);
			return 1;
		}
		catch(Exception e) {
			LuaDLL.luaL_error(l, e.ToString());
			return 0;
		}
	}
コード例 #3
0
 static public int GetNativeTextureID(IntPtr l)
 {
     try {
         UnityEngine.Texture self = (UnityEngine.Texture)checkSelf(l);
         var ret = self.GetNativeTextureID();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 public static void WriteOnTexture(Texture textureToWrite, string text, string fontName, DFTAlignment alignment, int fontSize, int width, int height)
 {
     if(width==0||height==0||fontSize==0)
     {
         Debug.Log("Please check arguments.");
     }
     else
     {
         LoadJC();
         string combinedValues=width.ToString()+"_"+height.ToString()+"_"+((int)alignment).ToString()+"_"+fontSize;
         if( jc!=null)jc.CallStatic("textToBitmap",textureToWrite.GetNativeTextureID(),text,fontName,combinedValues);
     }
 }
 public static void WriteOnTexture(Texture textureToWrite, string text, string fontName, DFTAlignment alignment, int fontSize, int width, int height)
 {
     if(width==0||height==0||fontSize==0)
     {
         Debug.Log("DynamicFontTextureBinding.WriteOnTexture: Please check arguments.");
     }
     else
     {
         Debug.Log("DynamicFontTextureBinding.WriteOnTexture: width = " + width + ", height = " + height + ", fontName = " + fontName + ", fontSize = " + fontSize + ", text = " + text);
         _writeOnGLTexture(textureToWrite.GetNativeTextureID(),text,fontName,(int)alignment,fontSize,width,height);
         Debug.Log("DynamicFontTextureBinding.WriteOnTexture Done");
      }
 }
コード例 #6
0
 static int GetNativeTextureID(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.Texture obj = (UnityEngine.Texture)ToLua.CheckObject(L, 1, typeof(UnityEngine.Texture));
         int o = obj.GetNativeTextureID();
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #7
0
    public bool ReplaceTexture(long movieId, String textureName, Texture texture)
    {
        int texId;
        int rt_with     = texture.width;
        int rt_height    = texture.height;

#if (UNITY_4_0) || (UNITY_4_1)
#if UNITY_IPHONE
        texId = texture.GetNativeTextureID();
#else
        IntPtr texPtr = texture.GetNativeTexturePtr();
        texId = (int)(texPtr);
#endif
#else
        texId = texture.GetNativeTextureID();
#endif

        return SF_ReplaceTexture(movieId, textureName, texId, rt_with, rt_height);
    }