|
1 | 1 | using System.Numerics; |
| 2 | +using System.Text; |
2 | 3 | using OpenTK.Graphics; |
3 | 4 | using Raylib_CSharp.Camera.Cam3D; |
4 | 5 | using Raylib_CSharp.Colors; |
|
77 | 78 | Console.WriteLine(info.Length + ""); |
78 | 79 |
|
79 | 80 | Image image = Font.GenImageAtlas(info, font.Recs, 18, 4, 0); |
| 81 | +Image clipboardImage = Window.GetClipboardImage(); //Not suported on all platforms |
80 | 82 | Texture2D texture = Texture2D.LoadFromImage(image); |
| 83 | +Texture2D clipboardTexture = Texture2D.LoadFromImage(clipboardImage); |
81 | 84 | image.Unload(); |
| 85 | +clipboardImage.Unload(); |
| 86 | + |
82 | 87 |
|
83 | 88 | FileManager.UnloadFileData(fileData); |
84 | 89 | TextManager.UnloadCodepoints(codepoints); |
|
104 | 109 |
|
105 | 110 | Font font2 = Font.GetDefault(); |
106 | 111 |
|
107 | | -//if (font2.IsReady()) { |
| 112 | +//if (font2.IsValid()) { |
108 | 113 | // |
109 | 114 | //} |
110 | 115 |
|
111 | 116 | Image testImage = Image.GenColor(100, 100, Color.Green); |
112 | 117 |
|
113 | 118 | NativeBindingsContext context = new NativeBindingsContext(); |
114 | 119 | GLLoader.LoadBindings(context); |
| 120 | +Console.WriteLine($"Bones:{model.Meshes[0].BoneCount}"); |
| 121 | +Console.WriteLine($"BoneMatrices:{model.Meshes[0].BoneMatrices[0]}"); |
| 122 | +var dataToEncode = Encoding.ASCII.GetBytes("This is a test"); |
| 123 | +Console.WriteLine($"CRC32 Checksum:{FileManager.ComputeCRC32(dataToEncode)}"); //As ISO-HDLC |
| 124 | + |
| 125 | +uint[] md5Hash = FileManager.ComputeMD5(dataToEncode); |
| 126 | +string hexString = string.Join("", md5Hash.Select(x => x.ToString("x8"))); |
| 127 | +Console.WriteLine($"MD5 Checksum: {hexString}"); |
| 128 | + |
| 129 | +uint[] sha1Hash = FileManager.ComputeSHA1(dataToEncode); |
| 130 | +hexString = string.Join("", sha1Hash.Select(x => x.ToString("x8"))); |
| 131 | +Console.WriteLine($"SHA1 Checksum: {hexString}"); |
115 | 132 |
|
116 | 133 | //Span<Matrix4x4> matrix = new(new Matrix4x4[1]); |
117 | 134 | //matrix[1] = new Matrix4x4(); |
|
133 | 150 |
|
134 | 151 | Graphics.DrawFPS(50, 50); |
135 | 152 | Graphics.DrawTexture(texture, 10, 10, Color.White); |
| 153 | + Graphics.DrawTexture(clipboardTexture, 128, 128, Color.White); |
136 | 154 |
|
137 | 155 | Graphics.EndDrawing(); |
138 | 156 | } |
|
0 commit comments