Exemple #1
0
 public IEnumerator Load(string path, Action <Texture2D> callAction)
 {
     yield return(LoadObject(path, (b, obj) =>
     {
         callAction.Invoke(b == null ? obj as Texture2D : ImageAccess.BytesToTexture2D(b));
     }));
 }
Exemple #2
0
 private void OnGUI()
 {
     if (texture2D == null)
     {
         texture2D = ImageAccess.FileToTexture2D("image/10253312_640x640_0.jpg");
     }
     if (texture2D == null)
     {
         texture2D = ImageAccess.FileToTexture2D(Access.PathConvertToMd5("image/10253312_640x640_0.jpg", KeyMd5));
     }
     if (texture2D != null)
     {
         GUI.DrawTexture(new Rect(0, 0, texture2D.width, texture2D.height), texture2D);
     }
     GUILayout.Label("SvnVersion:" + SoftwareVersion);
     if (patchListCache == null)
     {
         return;
     }
     foreach (var versionInfo in patchListCache)
     {
         GUILayout.Label(string.Format("{0}:{1}-{2}", versionInfo.Value.GroupName, versionInfo.Value.MinVersion,
                                       versionInfo.Value.MaxVersion));
     }
 }
 private static unsafe extern void glBindImageTexture(int unit, int texture, int level, bool layered, int layer, ImageAccess access, ImageFormat format);
 public static void BindImageTexture(int unit, int texture, int level, bool layered, int layer, ImageAccess access, ImageFormat format)
 {
     unsafe
     {
         glBindImageTexture(unit, texture, level, layered, layer, access, format);
     }
 }