mt-lang 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/Rakefile +1 -1
- data/docs/index.html +13 -3
- data/lib/milk_tea/base.rb +7 -2
- data/std/asset_pack.mt +267 -0
- data/std/async/libuv_runtime.mt +539 -0
- data/std/async/mailbox.mt +191 -0
- data/std/async/runtime.mt +87 -0
- data/std/async.mt +87 -0
- data/std/base64.mt +185 -0
- data/std/behavior_tree.mt +396 -0
- data/std/binary.mt +314 -0
- data/std/binary_heap.mt +157 -0
- data/std/bitset.mt +239 -0
- data/std/box2d.mt +535 -0
- data/std/bytes.mt +46 -0
- data/std/c/box2d.mt +1254 -0
- data/std/c/cgltf.mt +647 -0
- data/std/c/cjson.mt +106 -0
- data/std/c/crypto.mt +11 -0
- data/std/c/crypto_support.h +51 -0
- data/std/c/ctype.mt +19 -0
- data/std/c/ctype_bindgen.h +29 -0
- data/std/c/curl.mt +1223 -0
- data/std/c/enet.mt +473 -0
- data/std/c/errno.mt +41 -0
- data/std/c/errno_bindgen.h +53 -0
- data/std/c/flecs.mt +2945 -0
- data/std/c/fs.linux.mt +43 -0
- data/std/c/fs.windows.mt +43 -0
- data/std/c/fs_support.h +954 -0
- data/std/c/gl.mt +2065 -0
- data/std/c/gl_registry_helpers.h +10748 -0
- data/std/c/glfw.mt +499 -0
- data/std/c/libc.mt +167 -0
- data/std/c/libuv.mt +1491 -0
- data/std/c/math.mt +22 -0
- data/std/c/math_bindgen.h +31 -0
- data/std/c/miniaudio.mt +3420 -0
- data/std/c/pcre2.mt +735 -0
- data/std/c/process.mt +58 -0
- data/std/c/process_support.h +1147 -0
- data/std/c/raygui.mt +1602 -0
- data/std/c/raylib.mt +1245 -0
- data/std/c/raymath.mt +163 -0
- data/std/c/rlgl.mt +434 -0
- data/std/c/rpng.mt +60 -0
- data/std/c/rres.mt +187 -0
- data/std/c/sdl3.mt +4132 -0
- data/std/c/sqlite3.mt +951 -0
- data/std/c/stb_image.mt +52 -0
- data/std/c/stb_image_resize2.mt +128 -0
- data/std/c/stb_image_write.mt +19 -0
- data/std/c/stb_rect_pack.mt +38 -0
- data/std/c/stb_truetype.mt +175 -0
- data/std/c/stb_vorbis.mt +31 -0
- data/std/c/stdio.mt +90 -0
- data/std/c/steamworks.h +5769 -0
- data/std/c/steamworks.mt +4771 -0
- data/std/c/string.mt +16 -0
- data/std/c/string_bindgen.h +36 -0
- data/std/c/sync.mt +33 -0
- data/std/c/sync_support.h +219 -0
- data/std/c/terminal.mt +24 -0
- data/std/c/terminal_support.h +408 -0
- data/std/c/time.mt +26 -0
- data/std/c/tls.mt +24 -0
- data/std/c/tls_support.h +626 -0
- data/std/c/tracy.mt +53 -0
- data/std/c/zlib.mt +20 -0
- data/std/c/zlib_support.h +239 -0
- data/std/c/zstd.mt +231 -0
- data/std/cell.mt +60 -0
- data/std/cgltf.mt +115 -0
- data/std/cjson.mt +90 -0
- data/std/cli.mt +768 -0
- data/std/cookie.mt +198 -0
- data/std/counter.mt +160 -0
- data/std/crypto.mt +74 -0
- data/std/cstring.mt +13 -0
- data/std/ctype.mt +52 -0
- data/std/curl/runtime.mt +261 -0
- data/std/curl.mt +38 -0
- data/std/deque.mt +348 -0
- data/std/encoding.mt +93 -0
- data/std/enet.mt +133 -0
- data/std/env.mt +41 -0
- data/std/errno.mt +47 -0
- data/std/flecs.mt +978 -0
- data/std/fmt.mt +271 -0
- data/std/fs.linux.mt +696 -0
- data/std/fs.windows.mt +711 -0
- data/std/fsm.mt +267 -0
- data/std/gl.mt +2062 -0
- data/std/glfw.mt +471 -0
- data/std/goap.mt +342 -0
- data/std/graph.mt +521 -0
- data/std/gzip.mt +77 -0
- data/std/hash.mt +429 -0
- data/std/http/server.mt +810 -0
- data/std/http.mt +1227 -0
- data/std/intern.mt +53 -0
- data/std/jobs.mt +288 -0
- data/std/json.mt +627 -0
- data/std/libc.mt +34 -0
- data/std/libuv.mt +554 -0
- data/std/linear_algebra.mt +243 -0
- data/std/linked_map.mt +372 -0
- data/std/linked_map_view.mt +49 -0
- data/std/linked_set.mt +117 -0
- data/std/log.mt +69 -0
- data/std/map.mt +418 -0
- data/std/math.mt +24 -0
- data/std/mem/arena.mt +137 -0
- data/std/mem/endian.mt +51 -0
- data/std/mem/heap.mt +298 -0
- data/std/mem/pool.mt +164 -0
- data/std/mem/stack.mt +47 -0
- data/std/mem/tracking.mt +119 -0
- data/std/miniaudio.mt +1299 -0
- data/std/multiset.mt +191 -0
- data/std/net/channel.mt +727 -0
- data/std/net/clock.mt +237 -0
- data/std/net/discovery.mt +277 -0
- data/std/net/lobby.mt +813 -0
- data/std/net/manager.mt +539 -0
- data/std/net/mux.mt +839 -0
- data/std/net/nat.mt +122 -0
- data/std/net/packet.mt +219 -0
- data/std/net/punch.mt +162 -0
- data/std/net/rpc.mt +119 -0
- data/std/net/session.mt +1157 -0
- data/std/net/stun.mt +252 -0
- data/std/net/sync.mt +183 -0
- data/std/net/turn.mt +459 -0
- data/std/net.mt +2944 -0
- data/std/oauth2.mt +408 -0
- data/std/option.mt +51 -0
- data/std/ordered_map.mt +497 -0
- data/std/ordered_set.mt +348 -0
- data/std/path.mt +368 -0
- data/std/pcre2/runtime.mt +35 -0
- data/std/pcre2.mt +78 -0
- data/std/priority_queue.mt +55 -0
- data/std/process.mt +837 -0
- data/std/queue.mt +55 -0
- data/std/random.mt +146 -0
- data/std/raygui.mt +99 -0
- data/std/raylib/debug_console.mt +71 -0
- data/std/raylib/easing.mt +388 -0
- data/std/raylib/packed_assets.mt +255 -0
- data/std/raylib/runtime.mt +30 -0
- data/std/raylib/tracy_gpu.mt +37 -0
- data/std/raylib.mt +1510 -0
- data/std/raymath.mt +153 -0
- data/std/result.mt +89 -0
- data/std/rlgl.mt +268 -0
- data/std/rpng.mt +46 -0
- data/std/rres.mt +36 -0
- data/std/sdl3/runtime.mt +54 -0
- data/std/sdl3.mt +1731 -0
- data/std/serialize.mt +68 -0
- data/std/set.mt +124 -0
- data/std/spatial.mt +176 -0
- data/std/sqlite3.mt +151 -0
- data/std/stack.mt +55 -0
- data/std/stb_image.mt +47 -0
- data/std/stb_image_resize2.mt +41 -0
- data/std/stb_image_write.mt +17 -0
- data/std/stb_rect_pack.mt +15 -0
- data/std/stb_truetype.mt +77 -0
- data/std/stb_vorbis.mt +16 -0
- data/std/stdio.mt +88 -0
- data/std/steamworks.mt +1542 -0
- data/std/str.mt +293 -0
- data/std/string.mt +234 -0
- data/std/sync.mt +194 -0
- data/std/tar.mt +704 -0
- data/std/terminal.mt +1002 -0
- data/std/testing.mt +266 -0
- data/std/thread.mt +120 -0
- data/std/time.mt +105 -0
- data/std/tls.mt +616 -0
- data/std/toml.mt +1310 -0
- data/std/tracy.mt +42 -0
- data/std/uri.mt +118 -0
- data/std/url.mt +372 -0
- data/std/vec.mt +433 -0
- data/std/zstd.mt +94 -0
- metadata +187 -2
data/std/c/raymath.mt
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# generated by mtc bindgen from /home/teefan/Projects/Ruby/mt-lang/third_party/raylib-upstream/src/raymath.h
|
|
2
|
+
external
|
|
3
|
+
|
|
4
|
+
import std.c.raylib as rl
|
|
5
|
+
|
|
6
|
+
link "m"
|
|
7
|
+
include "raylib.h"
|
|
8
|
+
include "raymath.h"
|
|
9
|
+
|
|
10
|
+
struct Float3Array = c"float3":
|
|
11
|
+
v: array[float, 3]
|
|
12
|
+
|
|
13
|
+
struct Float16Array = c"float16":
|
|
14
|
+
v: array[float, 16]
|
|
15
|
+
|
|
16
|
+
external function Clamp(value: float, min: float, max: float) -> float
|
|
17
|
+
external function Lerp(start: float, end: float, amount: float) -> float
|
|
18
|
+
external function Normalize(value: float, start: float, end: float) -> float
|
|
19
|
+
external function Remap(value: float, inputStart: float, inputEnd: float, outputStart: float, outputEnd: float) -> float
|
|
20
|
+
external function Wrap(value: float, min: float, max: float) -> float
|
|
21
|
+
external function FloatEquals(x: float, y: float) -> int
|
|
22
|
+
external function Vector2Zero() -> rl.Vector2
|
|
23
|
+
external function Vector2One() -> rl.Vector2
|
|
24
|
+
external function Vector2Add(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2
|
|
25
|
+
external function Vector2AddValue(v: rl.Vector2, add: float) -> rl.Vector2
|
|
26
|
+
external function Vector2Subtract(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2
|
|
27
|
+
external function Vector2SubtractValue(v: rl.Vector2, sub: float) -> rl.Vector2
|
|
28
|
+
external function Vector2Length(v: rl.Vector2) -> float
|
|
29
|
+
external function Vector2LengthSqr(v: rl.Vector2) -> float
|
|
30
|
+
external function Vector2DotProduct(v1: rl.Vector2, v2: rl.Vector2) -> float
|
|
31
|
+
external function Vector2CrossProduct(v1: rl.Vector2, v2: rl.Vector2) -> float
|
|
32
|
+
external function Vector2Distance(v1: rl.Vector2, v2: rl.Vector2) -> float
|
|
33
|
+
external function Vector2DistanceSqr(v1: rl.Vector2, v2: rl.Vector2) -> float
|
|
34
|
+
external function Vector2Angle(v1: rl.Vector2, v2: rl.Vector2) -> float
|
|
35
|
+
external function Vector2LineAngle(start: rl.Vector2, end: rl.Vector2) -> float
|
|
36
|
+
external function Vector2Scale(v: rl.Vector2, scale: float) -> rl.Vector2
|
|
37
|
+
external function Vector2Multiply(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2
|
|
38
|
+
external function Vector2Negate(v: rl.Vector2) -> rl.Vector2
|
|
39
|
+
external function Vector2Divide(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2
|
|
40
|
+
external function Vector2Normalize(v: rl.Vector2) -> rl.Vector2
|
|
41
|
+
external function Vector2Transform(v: rl.Vector2, mat: rl.Matrix) -> rl.Vector2
|
|
42
|
+
external function Vector2Lerp(v1: rl.Vector2, v2: rl.Vector2, amount: float) -> rl.Vector2
|
|
43
|
+
external function Vector2Reflect(v: rl.Vector2, normal: rl.Vector2) -> rl.Vector2
|
|
44
|
+
external function Vector2Min(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2
|
|
45
|
+
external function Vector2Max(v1: rl.Vector2, v2: rl.Vector2) -> rl.Vector2
|
|
46
|
+
external function Vector2Rotate(v: rl.Vector2, angle: float) -> rl.Vector2
|
|
47
|
+
external function Vector2MoveTowards(v: rl.Vector2, target: rl.Vector2, maxDistance: float) -> rl.Vector2
|
|
48
|
+
external function Vector2Invert(v: rl.Vector2) -> rl.Vector2
|
|
49
|
+
external function Vector2Clamp(v: rl.Vector2, min: rl.Vector2, max: rl.Vector2) -> rl.Vector2
|
|
50
|
+
external function Vector2ClampValue(v: rl.Vector2, min: float, max: float) -> rl.Vector2
|
|
51
|
+
external function Vector2Equals(p: rl.Vector2, q: rl.Vector2) -> int
|
|
52
|
+
external function Vector2Refract(v: rl.Vector2, n: rl.Vector2, r: float) -> rl.Vector2
|
|
53
|
+
external function Vector3Zero() -> rl.Vector3
|
|
54
|
+
external function Vector3One() -> rl.Vector3
|
|
55
|
+
external function Vector3Add(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
56
|
+
external function Vector3AddValue(v: rl.Vector3, add: float) -> rl.Vector3
|
|
57
|
+
external function Vector3Subtract(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
58
|
+
external function Vector3SubtractValue(v: rl.Vector3, sub: float) -> rl.Vector3
|
|
59
|
+
external function Vector3Scale(v: rl.Vector3, scalar: float) -> rl.Vector3
|
|
60
|
+
external function Vector3Multiply(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
61
|
+
external function Vector3CrossProduct(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
62
|
+
external function Vector3Perpendicular(v: rl.Vector3) -> rl.Vector3
|
|
63
|
+
external function Vector3Length(v: rl.Vector3) -> float
|
|
64
|
+
external function Vector3LengthSqr(v: rl.Vector3) -> float
|
|
65
|
+
external function Vector3DotProduct(v1: rl.Vector3, v2: rl.Vector3) -> float
|
|
66
|
+
external function Vector3Distance(v1: rl.Vector3, v2: rl.Vector3) -> float
|
|
67
|
+
external function Vector3DistanceSqr(v1: rl.Vector3, v2: rl.Vector3) -> float
|
|
68
|
+
external function Vector3Angle(v1: rl.Vector3, v2: rl.Vector3) -> float
|
|
69
|
+
external function Vector3Negate(v: rl.Vector3) -> rl.Vector3
|
|
70
|
+
external function Vector3Divide(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
71
|
+
external function Vector3Normalize(v: rl.Vector3) -> rl.Vector3
|
|
72
|
+
external function Vector3Project(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
73
|
+
external function Vector3Reject(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
74
|
+
external function Vector3OrthoNormalize(v1: ptr[rl.Vector3], v2: ptr[rl.Vector3]) -> void
|
|
75
|
+
external function Vector3Transform(v: rl.Vector3, mat: rl.Matrix) -> rl.Vector3
|
|
76
|
+
external function Vector3RotateByQuaternion(v: rl.Vector3, q: rl.Vector4) -> rl.Vector3
|
|
77
|
+
external function Vector3RotateByAxisAngle(v: rl.Vector3, axis: rl.Vector3, angle: float) -> rl.Vector3
|
|
78
|
+
external function Vector3MoveTowards(v: rl.Vector3, target: rl.Vector3, maxDistance: float) -> rl.Vector3
|
|
79
|
+
external function Vector3Lerp(v1: rl.Vector3, v2: rl.Vector3, amount: float) -> rl.Vector3
|
|
80
|
+
external function Vector3CubicHermite(v1: rl.Vector3, tangent1: rl.Vector3, v2: rl.Vector3, tangent2: rl.Vector3, amount: float) -> rl.Vector3
|
|
81
|
+
external function Vector3Reflect(v: rl.Vector3, normal: rl.Vector3) -> rl.Vector3
|
|
82
|
+
external function Vector3Min(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
83
|
+
external function Vector3Max(v1: rl.Vector3, v2: rl.Vector3) -> rl.Vector3
|
|
84
|
+
external function Vector3Barycenter(p: rl.Vector3, a: rl.Vector3, b: rl.Vector3, c: rl.Vector3) -> rl.Vector3
|
|
85
|
+
external function Vector3Unproject(source: rl.Vector3, projection: rl.Matrix, view: rl.Matrix) -> rl.Vector3
|
|
86
|
+
external function Vector3ToFloatV(v: rl.Vector3) -> Float3Array
|
|
87
|
+
external function Vector3Invert(v: rl.Vector3) -> rl.Vector3
|
|
88
|
+
external function Vector3Clamp(v: rl.Vector3, min: rl.Vector3, max: rl.Vector3) -> rl.Vector3
|
|
89
|
+
external function Vector3ClampValue(v: rl.Vector3, min: float, max: float) -> rl.Vector3
|
|
90
|
+
external function Vector3Equals(p: rl.Vector3, q: rl.Vector3) -> int
|
|
91
|
+
external function Vector3Refract(v: rl.Vector3, n: rl.Vector3, r: float) -> rl.Vector3
|
|
92
|
+
external function Vector4Zero() -> rl.Vector4
|
|
93
|
+
external function Vector4One() -> rl.Vector4
|
|
94
|
+
external function Vector4Add(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4
|
|
95
|
+
external function Vector4AddValue(v: rl.Vector4, add: float) -> rl.Vector4
|
|
96
|
+
external function Vector4Subtract(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4
|
|
97
|
+
external function Vector4SubtractValue(v: rl.Vector4, add: float) -> rl.Vector4
|
|
98
|
+
external function Vector4Length(v: rl.Vector4) -> float
|
|
99
|
+
external function Vector4LengthSqr(v: rl.Vector4) -> float
|
|
100
|
+
external function Vector4DotProduct(v1: rl.Vector4, v2: rl.Vector4) -> float
|
|
101
|
+
external function Vector4Distance(v1: rl.Vector4, v2: rl.Vector4) -> float
|
|
102
|
+
external function Vector4DistanceSqr(v1: rl.Vector4, v2: rl.Vector4) -> float
|
|
103
|
+
external function Vector4Scale(v: rl.Vector4, scale: float) -> rl.Vector4
|
|
104
|
+
external function Vector4Multiply(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4
|
|
105
|
+
external function Vector4Negate(v: rl.Vector4) -> rl.Vector4
|
|
106
|
+
external function Vector4Divide(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4
|
|
107
|
+
external function Vector4Normalize(v: rl.Vector4) -> rl.Vector4
|
|
108
|
+
external function Vector4Min(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4
|
|
109
|
+
external function Vector4Max(v1: rl.Vector4, v2: rl.Vector4) -> rl.Vector4
|
|
110
|
+
external function Vector4Lerp(v1: rl.Vector4, v2: rl.Vector4, amount: float) -> rl.Vector4
|
|
111
|
+
external function Vector4MoveTowards(v: rl.Vector4, target: rl.Vector4, maxDistance: float) -> rl.Vector4
|
|
112
|
+
external function Vector4Invert(v: rl.Vector4) -> rl.Vector4
|
|
113
|
+
external function Vector4Equals(p: rl.Vector4, q: rl.Vector4) -> int
|
|
114
|
+
external function MatrixDeterminant(mat: rl.Matrix) -> float
|
|
115
|
+
external function MatrixTrace(mat: rl.Matrix) -> float
|
|
116
|
+
external function MatrixTranspose(mat: rl.Matrix) -> rl.Matrix
|
|
117
|
+
external function MatrixInvert(mat: rl.Matrix) -> rl.Matrix
|
|
118
|
+
external function MatrixIdentity() -> rl.Matrix
|
|
119
|
+
external function MatrixAdd(left: rl.Matrix, right: rl.Matrix) -> rl.Matrix
|
|
120
|
+
external function MatrixSubtract(left: rl.Matrix, right: rl.Matrix) -> rl.Matrix
|
|
121
|
+
external function MatrixMultiply(left: rl.Matrix, right: rl.Matrix) -> rl.Matrix
|
|
122
|
+
external function MatrixMultiplyValue(left: rl.Matrix, value: float) -> rl.Matrix
|
|
123
|
+
external function MatrixTranslate(x: float, y: float, z: float) -> rl.Matrix
|
|
124
|
+
external function MatrixRotate(axis: rl.Vector3, angle: float) -> rl.Matrix
|
|
125
|
+
external function MatrixRotateX(angle: float) -> rl.Matrix
|
|
126
|
+
external function MatrixRotateY(angle: float) -> rl.Matrix
|
|
127
|
+
external function MatrixRotateZ(angle: float) -> rl.Matrix
|
|
128
|
+
external function MatrixRotateXYZ(angle: rl.Vector3) -> rl.Matrix
|
|
129
|
+
external function MatrixRotateZYX(angle: rl.Vector3) -> rl.Matrix
|
|
130
|
+
external function MatrixScale(x: float, y: float, z: float) -> rl.Matrix
|
|
131
|
+
external function MatrixFrustum(left: double, right: double, bottom: double, top: double, nearPlane: double, farPlane: double) -> rl.Matrix
|
|
132
|
+
external function MatrixPerspective(fovY: double, aspect: double, nearPlane: double, farPlane: double) -> rl.Matrix
|
|
133
|
+
external function MatrixOrtho(left: double, right: double, bottom: double, top: double, nearPlane: double, farPlane: double) -> rl.Matrix
|
|
134
|
+
external function MatrixLookAt(eye: rl.Vector3, target: rl.Vector3, up: rl.Vector3) -> rl.Matrix
|
|
135
|
+
external function MatrixToFloatV(mat: rl.Matrix) -> Float16Array
|
|
136
|
+
external function QuaternionAdd(q1: rl.Vector4, q2: rl.Vector4) -> rl.Quaternion
|
|
137
|
+
external function QuaternionAddValue(q: rl.Vector4, add: float) -> rl.Quaternion
|
|
138
|
+
external function QuaternionSubtract(q1: rl.Vector4, q2: rl.Vector4) -> rl.Quaternion
|
|
139
|
+
external function QuaternionSubtractValue(q: rl.Vector4, sub: float) -> rl.Quaternion
|
|
140
|
+
external function QuaternionIdentity() -> rl.Quaternion
|
|
141
|
+
external function QuaternionLength(q: rl.Vector4) -> float
|
|
142
|
+
external function QuaternionNormalize(q: rl.Vector4) -> rl.Quaternion
|
|
143
|
+
external function QuaternionInvert(q: rl.Vector4) -> rl.Quaternion
|
|
144
|
+
external function QuaternionMultiply(q1: rl.Vector4, q2: rl.Vector4) -> rl.Quaternion
|
|
145
|
+
external function QuaternionScale(q: rl.Vector4, mul: float) -> rl.Quaternion
|
|
146
|
+
external function QuaternionDivide(q1: rl.Vector4, q2: rl.Vector4) -> rl.Quaternion
|
|
147
|
+
external function QuaternionLerp(q1: rl.Vector4, q2: rl.Vector4, amount: float) -> rl.Quaternion
|
|
148
|
+
external function QuaternionNlerp(q1: rl.Vector4, q2: rl.Vector4, amount: float) -> rl.Quaternion
|
|
149
|
+
external function QuaternionSlerp(q1: rl.Vector4, q2: rl.Vector4, amount: float) -> rl.Quaternion
|
|
150
|
+
external function QuaternionCubicHermiteSpline(q1: rl.Vector4, outTangent1: rl.Vector4, q2: rl.Vector4, inTangent2: rl.Vector4, t: float) -> rl.Quaternion
|
|
151
|
+
external function QuaternionFromVector3ToVector3(from: rl.Vector3, to: rl.Vector3) -> rl.Quaternion
|
|
152
|
+
external function QuaternionFromMatrix(mat: rl.Matrix) -> rl.Quaternion
|
|
153
|
+
external function QuaternionToMatrix(q: rl.Vector4) -> rl.Matrix
|
|
154
|
+
external function QuaternionFromAxisAngle(axis: rl.Vector3, angle: float) -> rl.Quaternion
|
|
155
|
+
external function QuaternionToAxisAngle(q: rl.Vector4, outAxis: ptr[rl.Vector3], outAngle: ptr[float]) -> void
|
|
156
|
+
external function QuaternionFromEuler(pitch: float, yaw: float, roll: float) -> rl.Quaternion
|
|
157
|
+
external function QuaternionToEuler(q: rl.Vector4) -> rl.Vector3
|
|
158
|
+
external function QuaternionTransform(q: rl.Vector4, mat: rl.Matrix) -> rl.Quaternion
|
|
159
|
+
external function QuaternionEquals(p: rl.Vector4, q: rl.Vector4) -> int
|
|
160
|
+
external function MatrixCompose(translation: rl.Vector3, rotation: rl.Vector4, scale: rl.Vector3) -> rl.Matrix
|
|
161
|
+
external function MatrixDecompose(mat: rl.Matrix, translation: ptr[rl.Vector3], rotation: ptr[rl.Quaternion], scale: ptr[rl.Vector3]) -> void
|
|
162
|
+
|
|
163
|
+
const EPSILON: float = 9.99999997E-7
|
data/std/c/rlgl.mt
ADDED
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
# generated by mtc bindgen from /home/teefan/Projects/Ruby/mt-lang/third_party/raylib-upstream/src/rlgl.h
|
|
2
|
+
external
|
|
3
|
+
|
|
4
|
+
link "raylib"
|
|
5
|
+
include "rlgl.h"
|
|
6
|
+
|
|
7
|
+
struct Matrix:
|
|
8
|
+
m0: float
|
|
9
|
+
m4: float
|
|
10
|
+
m8: float
|
|
11
|
+
m12: float
|
|
12
|
+
m1: float
|
|
13
|
+
m5: float
|
|
14
|
+
m9: float
|
|
15
|
+
m13: float
|
|
16
|
+
m2: float
|
|
17
|
+
m6: float
|
|
18
|
+
m10: float
|
|
19
|
+
m14: float
|
|
20
|
+
m3: float
|
|
21
|
+
m7: float
|
|
22
|
+
m11: float
|
|
23
|
+
m15: float
|
|
24
|
+
|
|
25
|
+
struct rlVertexBuffer:
|
|
26
|
+
elementCount: int
|
|
27
|
+
vertices: ptr[float]
|
|
28
|
+
texcoords: ptr[float]
|
|
29
|
+
normals: ptr[float]
|
|
30
|
+
colors: ptr[ubyte]
|
|
31
|
+
indices: ptr[uint]
|
|
32
|
+
vaoId: uint
|
|
33
|
+
vboId: array[uint, 5]
|
|
34
|
+
|
|
35
|
+
struct rlDrawCall:
|
|
36
|
+
mode: int
|
|
37
|
+
vertexCount: int
|
|
38
|
+
vertexAlignment: int
|
|
39
|
+
textureId: uint
|
|
40
|
+
|
|
41
|
+
struct rlRenderBatch:
|
|
42
|
+
bufferCount: int
|
|
43
|
+
currentBuffer: int
|
|
44
|
+
vertexBuffer: ptr[rlVertexBuffer]
|
|
45
|
+
draws: ptr[rlDrawCall]
|
|
46
|
+
drawCounter: int
|
|
47
|
+
currentDepth: float
|
|
48
|
+
|
|
49
|
+
enum rlGlVersion: int
|
|
50
|
+
RL_OPENGL_SOFTWARE = 0
|
|
51
|
+
RL_OPENGL_11 = 1
|
|
52
|
+
RL_OPENGL_21 = 2
|
|
53
|
+
RL_OPENGL_33 = 3
|
|
54
|
+
RL_OPENGL_43 = 4
|
|
55
|
+
RL_OPENGL_ES_20 = 5
|
|
56
|
+
RL_OPENGL_ES_30 = 6
|
|
57
|
+
|
|
58
|
+
enum rlTraceLogLevel: int
|
|
59
|
+
RL_LOG_ALL = 0
|
|
60
|
+
RL_LOG_TRACE = 1
|
|
61
|
+
RL_LOG_DEBUG = 2
|
|
62
|
+
RL_LOG_INFO = 3
|
|
63
|
+
RL_LOG_WARNING = 4
|
|
64
|
+
RL_LOG_ERROR = 5
|
|
65
|
+
RL_LOG_FATAL = 6
|
|
66
|
+
RL_LOG_NONE = 7
|
|
67
|
+
|
|
68
|
+
enum rlPixelFormat: int
|
|
69
|
+
RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1
|
|
70
|
+
RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2
|
|
71
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3
|
|
72
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4
|
|
73
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5
|
|
74
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6
|
|
75
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7
|
|
76
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R32 = 8
|
|
77
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
|
|
78
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
|
|
79
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R16 = 11
|
|
80
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12
|
|
81
|
+
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13
|
|
82
|
+
RL_PIXELFORMAT_COMPRESSED_DXT1_RGB = 14
|
|
83
|
+
RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15
|
|
84
|
+
RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16
|
|
85
|
+
RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17
|
|
86
|
+
RL_PIXELFORMAT_COMPRESSED_ETC1_RGB = 18
|
|
87
|
+
RL_PIXELFORMAT_COMPRESSED_ETC2_RGB = 19
|
|
88
|
+
RL_PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20
|
|
89
|
+
RL_PIXELFORMAT_COMPRESSED_PVRT_RGB = 21
|
|
90
|
+
RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22
|
|
91
|
+
RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23
|
|
92
|
+
RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24
|
|
93
|
+
|
|
94
|
+
enum rlTextureFilter: int
|
|
95
|
+
RL_TEXTURE_FILTER_POINT = 0
|
|
96
|
+
RL_TEXTURE_FILTER_BILINEAR = 1
|
|
97
|
+
RL_TEXTURE_FILTER_TRILINEAR = 2
|
|
98
|
+
RL_TEXTURE_FILTER_ANISOTROPIC_4X = 3
|
|
99
|
+
RL_TEXTURE_FILTER_ANISOTROPIC_8X = 4
|
|
100
|
+
RL_TEXTURE_FILTER_ANISOTROPIC_16X = 5
|
|
101
|
+
|
|
102
|
+
enum rlBlendMode: int
|
|
103
|
+
RL_BLEND_ALPHA = 0
|
|
104
|
+
RL_BLEND_ADDITIVE = 1
|
|
105
|
+
RL_BLEND_MULTIPLIED = 2
|
|
106
|
+
RL_BLEND_ADD_COLORS = 3
|
|
107
|
+
RL_BLEND_SUBTRACT_COLORS = 4
|
|
108
|
+
RL_BLEND_ALPHA_PREMULTIPLY = 5
|
|
109
|
+
RL_BLEND_CUSTOM = 6
|
|
110
|
+
RL_BLEND_CUSTOM_SEPARATE = 7
|
|
111
|
+
|
|
112
|
+
enum rlShaderLocationIndex: int
|
|
113
|
+
RL_SHADER_LOC_VERTEX_POSITION = 0
|
|
114
|
+
RL_SHADER_LOC_VERTEX_TEXCOORD01 = 1
|
|
115
|
+
RL_SHADER_LOC_VERTEX_TEXCOORD02 = 2
|
|
116
|
+
RL_SHADER_LOC_VERTEX_NORMAL = 3
|
|
117
|
+
RL_SHADER_LOC_VERTEX_TANGENT = 4
|
|
118
|
+
RL_SHADER_LOC_VERTEX_COLOR = 5
|
|
119
|
+
RL_SHADER_LOC_MATRIX_MVP = 6
|
|
120
|
+
RL_SHADER_LOC_MATRIX_VIEW = 7
|
|
121
|
+
RL_SHADER_LOC_MATRIX_PROJECTION = 8
|
|
122
|
+
RL_SHADER_LOC_MATRIX_MODEL = 9
|
|
123
|
+
RL_SHADER_LOC_MATRIX_NORMAL = 10
|
|
124
|
+
RL_SHADER_LOC_VECTOR_VIEW = 11
|
|
125
|
+
RL_SHADER_LOC_COLOR_DIFFUSE = 12
|
|
126
|
+
RL_SHADER_LOC_COLOR_SPECULAR = 13
|
|
127
|
+
RL_SHADER_LOC_COLOR_AMBIENT = 14
|
|
128
|
+
RL_SHADER_LOC_MAP_ALBEDO = 15
|
|
129
|
+
RL_SHADER_LOC_MAP_METALNESS = 16
|
|
130
|
+
RL_SHADER_LOC_MAP_NORMAL = 17
|
|
131
|
+
RL_SHADER_LOC_MAP_ROUGHNESS = 18
|
|
132
|
+
RL_SHADER_LOC_MAP_OCCLUSION = 19
|
|
133
|
+
RL_SHADER_LOC_MAP_EMISSION = 20
|
|
134
|
+
RL_SHADER_LOC_MAP_HEIGHT = 21
|
|
135
|
+
RL_SHADER_LOC_MAP_CUBEMAP = 22
|
|
136
|
+
RL_SHADER_LOC_MAP_IRRADIANCE = 23
|
|
137
|
+
RL_SHADER_LOC_MAP_PREFILTER = 24
|
|
138
|
+
RL_SHADER_LOC_MAP_BRDF = 25
|
|
139
|
+
|
|
140
|
+
enum rlShaderUniformDataType: int
|
|
141
|
+
RL_SHADER_UNIFORM_FLOAT = 0
|
|
142
|
+
RL_SHADER_UNIFORM_VEC2 = 1
|
|
143
|
+
RL_SHADER_UNIFORM_VEC3 = 2
|
|
144
|
+
RL_SHADER_UNIFORM_VEC4 = 3
|
|
145
|
+
RL_SHADER_UNIFORM_INT = 4
|
|
146
|
+
RL_SHADER_UNIFORM_IVEC2 = 5
|
|
147
|
+
RL_SHADER_UNIFORM_IVEC3 = 6
|
|
148
|
+
RL_SHADER_UNIFORM_IVEC4 = 7
|
|
149
|
+
RL_SHADER_UNIFORM_UINT = 8
|
|
150
|
+
RL_SHADER_UNIFORM_UIVEC2 = 9
|
|
151
|
+
RL_SHADER_UNIFORM_UIVEC3 = 10
|
|
152
|
+
RL_SHADER_UNIFORM_UIVEC4 = 11
|
|
153
|
+
RL_SHADER_UNIFORM_SAMPLER2D = 12
|
|
154
|
+
|
|
155
|
+
enum rlShaderAttributeDataType: int
|
|
156
|
+
RL_SHADER_ATTRIB_FLOAT = 0
|
|
157
|
+
RL_SHADER_ATTRIB_VEC2 = 1
|
|
158
|
+
RL_SHADER_ATTRIB_VEC3 = 2
|
|
159
|
+
RL_SHADER_ATTRIB_VEC4 = 3
|
|
160
|
+
|
|
161
|
+
enum rlFramebufferAttachType: int
|
|
162
|
+
RL_ATTACHMENT_COLOR_CHANNEL0 = 0
|
|
163
|
+
RL_ATTACHMENT_COLOR_CHANNEL1 = 1
|
|
164
|
+
RL_ATTACHMENT_COLOR_CHANNEL2 = 2
|
|
165
|
+
RL_ATTACHMENT_COLOR_CHANNEL3 = 3
|
|
166
|
+
RL_ATTACHMENT_COLOR_CHANNEL4 = 4
|
|
167
|
+
RL_ATTACHMENT_COLOR_CHANNEL5 = 5
|
|
168
|
+
RL_ATTACHMENT_COLOR_CHANNEL6 = 6
|
|
169
|
+
RL_ATTACHMENT_COLOR_CHANNEL7 = 7
|
|
170
|
+
RL_ATTACHMENT_DEPTH = 100
|
|
171
|
+
RL_ATTACHMENT_STENCIL = 200
|
|
172
|
+
|
|
173
|
+
enum rlFramebufferAttachTextureType: int
|
|
174
|
+
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0
|
|
175
|
+
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1
|
|
176
|
+
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2
|
|
177
|
+
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3
|
|
178
|
+
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4
|
|
179
|
+
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5
|
|
180
|
+
RL_ATTACHMENT_TEXTURE2D = 100
|
|
181
|
+
RL_ATTACHMENT_RENDERBUFFER = 200
|
|
182
|
+
|
|
183
|
+
flags rlCullMode: int
|
|
184
|
+
RL_CULL_FACE_FRONT = 0
|
|
185
|
+
RL_CULL_FACE_BACK = 1
|
|
186
|
+
|
|
187
|
+
external function rlMatrixMode(mode: int) -> void
|
|
188
|
+
external function rlPushMatrix() -> void
|
|
189
|
+
external function rlPopMatrix() -> void
|
|
190
|
+
external function rlLoadIdentity() -> void
|
|
191
|
+
external function rlTranslatef(x: float, y: float, z: float) -> void
|
|
192
|
+
external function rlRotatef(angle: float, x: float, y: float, z: float) -> void
|
|
193
|
+
external function rlScalef(x: float, y: float, z: float) -> void
|
|
194
|
+
external function rlMultMatrixf(matf: const_ptr[float]) -> void
|
|
195
|
+
external function rlFrustum(left: double, right: double, bottom: double, top: double, znear: double, zfar: double) -> void
|
|
196
|
+
external function rlOrtho(left: double, right: double, bottom: double, top: double, znear: double, zfar: double) -> void
|
|
197
|
+
external function rlViewport(x: int, y: int, width: int, height: int) -> void
|
|
198
|
+
external function rlSetClipPlanes(nearPlane: double, farPlane: double) -> void
|
|
199
|
+
external function rlGetCullDistanceNear() -> double
|
|
200
|
+
external function rlGetCullDistanceFar() -> double
|
|
201
|
+
external function rlBegin(mode: int) -> void
|
|
202
|
+
external function rlEnd() -> void
|
|
203
|
+
external function rlVertex2i(x: int, y: int) -> void
|
|
204
|
+
external function rlVertex2f(x: float, y: float) -> void
|
|
205
|
+
external function rlVertex3f(x: float, y: float, z: float) -> void
|
|
206
|
+
external function rlTexCoord2f(x: float, y: float) -> void
|
|
207
|
+
external function rlNormal3f(x: float, y: float, z: float) -> void
|
|
208
|
+
external function rlColor4ub(r: ubyte, g: ubyte, b: ubyte, a: ubyte) -> void
|
|
209
|
+
external function rlColor3f(x: float, y: float, z: float) -> void
|
|
210
|
+
external function rlColor4f(x: float, y: float, z: float, w: float) -> void
|
|
211
|
+
external function rlEnableVertexArray(vaoId: uint) -> bool
|
|
212
|
+
external function rlDisableVertexArray() -> void
|
|
213
|
+
external function rlEnableVertexBuffer(id: uint) -> void
|
|
214
|
+
external function rlDisableVertexBuffer() -> void
|
|
215
|
+
external function rlEnableVertexBufferElement(id: uint) -> void
|
|
216
|
+
external function rlDisableVertexBufferElement() -> void
|
|
217
|
+
external function rlEnableVertexAttribute(index: uint) -> void
|
|
218
|
+
external function rlDisableVertexAttribute(index: uint) -> void
|
|
219
|
+
external function rlEnableStatePointer(vertexAttribType: int, buffer: ptr[void]) -> void
|
|
220
|
+
external function rlDisableStatePointer(vertexAttribType: int) -> void
|
|
221
|
+
external function rlActiveTextureSlot(slot: int) -> void
|
|
222
|
+
external function rlEnableTexture(id: uint) -> void
|
|
223
|
+
external function rlDisableTexture() -> void
|
|
224
|
+
external function rlEnableTextureCubemap(id: uint) -> void
|
|
225
|
+
external function rlDisableTextureCubemap() -> void
|
|
226
|
+
external function rlTextureParameters(id: uint, param: int, value: int) -> void
|
|
227
|
+
external function rlCubemapParameters(id: uint, param: int, value: int) -> void
|
|
228
|
+
external function rlEnableShader(id: uint) -> void
|
|
229
|
+
external function rlDisableShader() -> void
|
|
230
|
+
external function rlEnableFramebuffer(id: uint) -> void
|
|
231
|
+
external function rlDisableFramebuffer() -> void
|
|
232
|
+
external function rlGetActiveFramebuffer() -> uint
|
|
233
|
+
external function rlActiveDrawBuffers(count: int) -> void
|
|
234
|
+
external function rlBlitFramebuffer(srcX: int, srcY: int, srcWidth: int, srcHeight: int, dstX: int, dstY: int, dstWidth: int, dstHeight: int, bufferMask: int) -> void
|
|
235
|
+
external function rlBindFramebuffer(target: uint, framebuffer: uint) -> void
|
|
236
|
+
external function rlEnableColorBlend() -> void
|
|
237
|
+
external function rlDisableColorBlend() -> void
|
|
238
|
+
external function rlEnableDepthTest() -> void
|
|
239
|
+
external function rlDisableDepthTest() -> void
|
|
240
|
+
external function rlEnableDepthMask() -> void
|
|
241
|
+
external function rlDisableDepthMask() -> void
|
|
242
|
+
external function rlEnableBackfaceCulling() -> void
|
|
243
|
+
external function rlDisableBackfaceCulling() -> void
|
|
244
|
+
external function rlColorMask(r: bool, g: bool, b: bool, a: bool) -> void
|
|
245
|
+
external function rlSetCullFace(mode: int) -> void
|
|
246
|
+
external function rlEnableScissorTest() -> void
|
|
247
|
+
external function rlDisableScissorTest() -> void
|
|
248
|
+
external function rlScissor(x: int, y: int, width: int, height: int) -> void
|
|
249
|
+
external function rlEnablePointMode() -> void
|
|
250
|
+
external function rlDisablePointMode() -> void
|
|
251
|
+
external function rlSetPointSize(size: float) -> void
|
|
252
|
+
external function rlGetPointSize() -> float
|
|
253
|
+
external function rlEnableWireMode() -> void
|
|
254
|
+
external function rlDisableWireMode() -> void
|
|
255
|
+
external function rlSetLineWidth(width: float) -> void
|
|
256
|
+
external function rlGetLineWidth() -> float
|
|
257
|
+
external function rlEnableSmoothLines() -> void
|
|
258
|
+
external function rlDisableSmoothLines() -> void
|
|
259
|
+
external function rlEnableStereoRender() -> void
|
|
260
|
+
external function rlDisableStereoRender() -> void
|
|
261
|
+
external function rlIsStereoRenderEnabled() -> bool
|
|
262
|
+
external function rlClearColor(r: ubyte, g: ubyte, b: ubyte, a: ubyte) -> void
|
|
263
|
+
external function rlClearScreenBuffers() -> void
|
|
264
|
+
external function rlCheckErrors() -> void
|
|
265
|
+
external function rlSetBlendMode(mode: int) -> void
|
|
266
|
+
external function rlSetBlendFactors(glSrcFactor: int, glDstFactor: int, glEquation: int) -> void
|
|
267
|
+
external function rlSetBlendFactorsSeparate(glSrcRGB: int, glDstRGB: int, glSrcAlpha: int, glDstAlpha: int, glEqRGB: int, glEqAlpha: int) -> void
|
|
268
|
+
external function rlglInit(width: int, height: int) -> void
|
|
269
|
+
external function rlglClose() -> void
|
|
270
|
+
external function rlLoadExtensions(loader: ptr[void]) -> void
|
|
271
|
+
external function rlGetProcAddress(procName: cstr) -> ptr[void]?
|
|
272
|
+
external function rlGetVersion() -> int
|
|
273
|
+
external function rlSetFramebufferWidth(width: int) -> void
|
|
274
|
+
external function rlGetFramebufferWidth() -> int
|
|
275
|
+
external function rlSetFramebufferHeight(height: int) -> void
|
|
276
|
+
external function rlGetFramebufferHeight() -> int
|
|
277
|
+
external function rlGetTextureIdDefault() -> uint
|
|
278
|
+
external function rlGetShaderIdDefault() -> uint
|
|
279
|
+
external function rlGetShaderLocsDefault() -> ptr[int]
|
|
280
|
+
external function rlLoadRenderBatch(numBuffers: int, bufferElements: int) -> rlRenderBatch
|
|
281
|
+
external function rlUnloadRenderBatch(batch: rlRenderBatch) -> void
|
|
282
|
+
external function rlDrawRenderBatch(batch: ptr[rlRenderBatch]) -> void
|
|
283
|
+
external function rlSetRenderBatchActive(batch: ptr[rlRenderBatch]?) -> void
|
|
284
|
+
external function rlDrawRenderBatchActive() -> void
|
|
285
|
+
external function rlCheckRenderBatchLimit(vCount: int) -> bool
|
|
286
|
+
external function rlSetTexture(id: uint) -> void
|
|
287
|
+
external function rlLoadVertexArray() -> uint
|
|
288
|
+
external function rlLoadVertexBuffer(buffer: const_ptr[void], size: int, dynamic: bool) -> uint
|
|
289
|
+
external function rlLoadVertexBufferElement(buffer: const_ptr[void], size: int, dynamic: bool) -> uint
|
|
290
|
+
external function rlUpdateVertexBuffer(bufferId: uint, data: const_ptr[void], dataSize: int, offset: int) -> void
|
|
291
|
+
external function rlUpdateVertexBufferElements(id: uint, data: const_ptr[void], dataSize: int, offset: int) -> void
|
|
292
|
+
external function rlUnloadVertexArray(vaoId: uint) -> void
|
|
293
|
+
external function rlUnloadVertexBuffer(vboId: uint) -> void
|
|
294
|
+
external function rlSetVertexAttribute(index: uint, compSize: int, type_: int, normalized: bool, stride: int, offset: int) -> void
|
|
295
|
+
external function rlSetVertexAttributeDivisor(index: uint, divisor: int) -> void
|
|
296
|
+
external function rlSetVertexAttributeDefault(locIndex: int, value: const_ptr[void], attribType: int, count: int) -> void
|
|
297
|
+
external function rlDrawVertexArray(offset: int, count: int) -> void
|
|
298
|
+
external function rlDrawVertexArrayElements(offset: int, count: int, buffer: const_ptr[void]) -> void
|
|
299
|
+
external function rlDrawVertexArrayInstanced(offset: int, count: int, instances: int) -> void
|
|
300
|
+
external function rlDrawVertexArrayElementsInstanced(offset: int, count: int, buffer: const_ptr[void], instances: int) -> void
|
|
301
|
+
external function rlLoadTexture(data: const_ptr[void]?, width: int, height: int, format: int, mipmapCount: int) -> uint
|
|
302
|
+
external function rlLoadTextureDepth(width: int, height: int, useRenderBuffer: bool) -> uint
|
|
303
|
+
external function rlLoadTextureCubemap(data: const_ptr[void]?, size: int, format: int, mipmapCount: int) -> uint
|
|
304
|
+
external function rlUpdateTexture(id: uint, offsetX: int, offsetY: int, width: int, height: int, format: int, data: const_ptr[void]) -> void
|
|
305
|
+
external function rlGetGlTextureFormats(format: int, glInternalFormat: ptr[uint], glFormat: ptr[uint], glType: ptr[uint]) -> void
|
|
306
|
+
external function rlGetPixelFormatName(format: uint) -> cstr
|
|
307
|
+
external function rlUnloadTexture(id: uint) -> void
|
|
308
|
+
external function rlGenTextureMipmaps(id: uint, width: int, height: int, format: int, mipmaps: ptr[int]) -> void
|
|
309
|
+
external function rlReadTexturePixels(id: uint, width: int, height: int, format: int) -> ptr[void]
|
|
310
|
+
external function rlReadScreenPixels(width: int, height: int) -> ptr[ubyte]
|
|
311
|
+
external function rlLoadFramebuffer() -> uint
|
|
312
|
+
external function rlFramebufferAttach(id: uint, texId: uint, attachType: int, texType: int, mipLevel: int) -> void
|
|
313
|
+
external function rlFramebufferComplete(id: uint) -> bool
|
|
314
|
+
external function rlUnloadFramebuffer(id: uint) -> void
|
|
315
|
+
external function rlCopyFramebuffer(x: int, y: int, width: int, height: int, format: int, pixels: ptr[void]) -> void
|
|
316
|
+
external function rlResizeFramebuffer(width: int, height: int) -> void
|
|
317
|
+
external function rlLoadShader(code: cstr, type_: int) -> uint
|
|
318
|
+
external function rlLoadShaderProgram(vsCode: cstr?, fsCode: cstr?) -> uint
|
|
319
|
+
external function rlLoadShaderProgramEx(vsId: uint, fsId: uint) -> uint
|
|
320
|
+
external function rlLoadShaderProgramCompute(csId: uint) -> uint
|
|
321
|
+
external function rlUnloadShader(id: uint) -> void
|
|
322
|
+
external function rlUnloadShaderProgram(id: uint) -> void
|
|
323
|
+
external function rlGetLocationUniform(id: uint, uniformName: cstr) -> int
|
|
324
|
+
external function rlGetLocationAttrib(id: uint, attribName: cstr) -> int
|
|
325
|
+
external function rlSetUniform(locIndex: int, value: const_ptr[void], uniformType: int, count: int) -> void
|
|
326
|
+
external function rlSetUniformMatrix(locIndex: int, mat: Matrix) -> void
|
|
327
|
+
external function rlSetUniformMatrices(locIndex: int, mat: const_ptr[Matrix], count: int) -> void
|
|
328
|
+
external function rlSetUniformSampler(locIndex: int, textureId: uint) -> void
|
|
329
|
+
external function rlSetShader(id: uint, locs: ptr[int]) -> void
|
|
330
|
+
external function rlComputeShaderDispatch(groupX: uint, groupY: uint, groupZ: uint) -> void
|
|
331
|
+
external function rlLoadShaderBuffer(size: uint, data: const_ptr[void]?, usageHint: int) -> uint
|
|
332
|
+
external function rlUnloadShaderBuffer(ssboId: uint) -> void
|
|
333
|
+
external function rlUpdateShaderBuffer(id: uint, data: const_ptr[void], dataSize: uint, offset: uint) -> void
|
|
334
|
+
external function rlBindShaderBuffer(id: uint, index: uint) -> void
|
|
335
|
+
external function rlReadShaderBuffer(id: uint, dest: ptr[void], count: uint, offset: uint) -> void
|
|
336
|
+
external function rlCopyShaderBuffer(destId: uint, srcId: uint, destOffset: uint, srcOffset: uint, count: uint) -> void
|
|
337
|
+
external function rlGetShaderBufferSize(id: uint) -> uint
|
|
338
|
+
external function rlBindImageTexture(id: uint, index: uint, format: int, readonly: bool) -> void
|
|
339
|
+
external function rlGetMatrixModelview() -> Matrix
|
|
340
|
+
external function rlGetMatrixProjection() -> Matrix
|
|
341
|
+
external function rlGetMatrixTransform() -> Matrix
|
|
342
|
+
external function rlGetMatrixProjectionStereo(eye: int) -> Matrix
|
|
343
|
+
external function rlGetMatrixViewOffsetStereo(eye: int) -> Matrix
|
|
344
|
+
external function rlSetMatrixProjection(proj: Matrix) -> void
|
|
345
|
+
external function rlSetMatrixModelview(view: Matrix) -> void
|
|
346
|
+
external function rlSetMatrixProjectionStereo(right: Matrix, left: Matrix) -> void
|
|
347
|
+
external function rlSetMatrixViewOffsetStereo(right: Matrix, left: Matrix) -> void
|
|
348
|
+
external function rlLoadDrawCube() -> void
|
|
349
|
+
external function rlLoadDrawQuad() -> void
|
|
350
|
+
|
|
351
|
+
const RL_DEFAULT_BATCH_BUFFER_ELEMENTS: int = 8192
|
|
352
|
+
const RL_DEFAULT_BATCH_BUFFERS: int = 1
|
|
353
|
+
const RL_DEFAULT_BATCH_DRAWCALLS: int = 256
|
|
354
|
+
const RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS: int = 4
|
|
355
|
+
const RL_MAX_MATRIX_STACK_SIZE: int = 32
|
|
356
|
+
const RL_MAX_SHADER_LOCATIONS: int = 32
|
|
357
|
+
const RL_CULL_DISTANCE_NEAR: double = 0.050000000000000003
|
|
358
|
+
const RL_CULL_DISTANCE_FAR: double = 4000.0
|
|
359
|
+
const RL_TEXTURE_WRAP_S: int = 10242
|
|
360
|
+
const RL_TEXTURE_WRAP_T: int = 10243
|
|
361
|
+
const RL_TEXTURE_MAG_FILTER: int = 10240
|
|
362
|
+
const RL_TEXTURE_MIN_FILTER: int = 10241
|
|
363
|
+
const RL_TEXTURE_FILTER_NEAREST: int = 9728
|
|
364
|
+
const RL_TEXTURE_FILTER_LINEAR: int = 9729
|
|
365
|
+
const RL_TEXTURE_FILTER_MIP_NEAREST: int = 9984
|
|
366
|
+
const RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR: int = 9986
|
|
367
|
+
const RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST: int = 9985
|
|
368
|
+
const RL_TEXTURE_FILTER_MIP_LINEAR: int = 9987
|
|
369
|
+
const RL_TEXTURE_FILTER_ANISOTROPIC: int = 12288
|
|
370
|
+
const RL_TEXTURE_MIPMAP_BIAS_RATIO: int = 16384
|
|
371
|
+
const RL_TEXTURE_WRAP_REPEAT: int = 10497
|
|
372
|
+
const RL_TEXTURE_WRAP_CLAMP: int = 33071
|
|
373
|
+
const RL_TEXTURE_WRAP_MIRROR_REPEAT: int = 33648
|
|
374
|
+
const RL_TEXTURE_WRAP_MIRROR_CLAMP: int = 34626
|
|
375
|
+
const RL_MODELVIEW: int = 5888
|
|
376
|
+
const RL_PROJECTION: int = 5889
|
|
377
|
+
const RL_TEXTURE: int = 5890
|
|
378
|
+
const RL_LINES: int = 1
|
|
379
|
+
const RL_TRIANGLES: int = 4
|
|
380
|
+
const RL_QUADS: int = 7
|
|
381
|
+
const RL_UNSIGNED_BYTE: int = 5121
|
|
382
|
+
const RL_FLOAT: int = 5126
|
|
383
|
+
const RL_STREAM_DRAW: int = 35040
|
|
384
|
+
const RL_STREAM_READ: int = 35041
|
|
385
|
+
const RL_STREAM_COPY: int = 35042
|
|
386
|
+
const RL_STATIC_DRAW: int = 35044
|
|
387
|
+
const RL_STATIC_READ: int = 35045
|
|
388
|
+
const RL_STATIC_COPY: int = 35046
|
|
389
|
+
const RL_DYNAMIC_DRAW: int = 35048
|
|
390
|
+
const RL_DYNAMIC_READ: int = 35049
|
|
391
|
+
const RL_DYNAMIC_COPY: int = 35050
|
|
392
|
+
const RL_FRAGMENT_SHADER: int = 35632
|
|
393
|
+
const RL_VERTEX_SHADER: int = 35633
|
|
394
|
+
const RL_COMPUTE_SHADER: int = 37305
|
|
395
|
+
const RL_ZERO: int = 0
|
|
396
|
+
const RL_ONE: int = 1
|
|
397
|
+
const RL_SRC_COLOR: int = 768
|
|
398
|
+
const RL_ONE_MINUS_SRC_COLOR: int = 769
|
|
399
|
+
const RL_SRC_ALPHA: int = 770
|
|
400
|
+
const RL_ONE_MINUS_SRC_ALPHA: int = 771
|
|
401
|
+
const RL_DST_ALPHA: int = 772
|
|
402
|
+
const RL_ONE_MINUS_DST_ALPHA: int = 773
|
|
403
|
+
const RL_DST_COLOR: int = 774
|
|
404
|
+
const RL_ONE_MINUS_DST_COLOR: int = 775
|
|
405
|
+
const RL_SRC_ALPHA_SATURATE: int = 776
|
|
406
|
+
const RL_CONSTANT_COLOR: int = 32769
|
|
407
|
+
const RL_ONE_MINUS_CONSTANT_COLOR: int = 32770
|
|
408
|
+
const RL_CONSTANT_ALPHA: int = 32771
|
|
409
|
+
const RL_ONE_MINUS_CONSTANT_ALPHA: int = 32772
|
|
410
|
+
const RL_FUNC_ADD: int = 32774
|
|
411
|
+
const RL_MIN: int = 32775
|
|
412
|
+
const RL_MAX: int = 32776
|
|
413
|
+
const RL_FUNC_SUBTRACT: int = 32778
|
|
414
|
+
const RL_FUNC_REVERSE_SUBTRACT: int = 32779
|
|
415
|
+
const RL_BLEND_EQUATION: int = 32777
|
|
416
|
+
const RL_BLEND_EQUATION_RGB: int = 32777
|
|
417
|
+
const RL_BLEND_EQUATION_ALPHA: int = 34877
|
|
418
|
+
const RL_BLEND_DST_RGB: int = 32968
|
|
419
|
+
const RL_BLEND_SRC_RGB: int = 32969
|
|
420
|
+
const RL_BLEND_DST_ALPHA: int = 32970
|
|
421
|
+
const RL_BLEND_SRC_ALPHA: int = 32971
|
|
422
|
+
const RL_BLEND_COLOR: int = 32773
|
|
423
|
+
const RL_READ_FRAMEBUFFER: int = 36008
|
|
424
|
+
const RL_DRAW_FRAMEBUFFER: int = 36009
|
|
425
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION: int = 0
|
|
426
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD: int = 1
|
|
427
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL: int = 2
|
|
428
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR: int = 3
|
|
429
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT: int = 4
|
|
430
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2: int = 5
|
|
431
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES: int = 6
|
|
432
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEINDICES: int = 7
|
|
433
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS: int = 8
|
|
434
|
+
const RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM: int = 9
|
data/std/c/rpng.mt
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# generated by mtc bindgen from /home/teefan/Projects/Ruby/mt-lang/third_party/rpng-upstream/src/rpng.h
|
|
2
|
+
external
|
|
3
|
+
|
|
4
|
+
include "rpng.h"
|
|
5
|
+
|
|
6
|
+
struct rpng_chunk:
|
|
7
|
+
length: int
|
|
8
|
+
type_: array[char, 4]
|
|
9
|
+
data: ptr[char]
|
|
10
|
+
crc: uint
|
|
11
|
+
|
|
12
|
+
struct rpng_color:
|
|
13
|
+
r: ubyte
|
|
14
|
+
g: ubyte
|
|
15
|
+
b: ubyte
|
|
16
|
+
a: ubyte
|
|
17
|
+
|
|
18
|
+
struct rpng_palette:
|
|
19
|
+
color_count: int
|
|
20
|
+
colors: ptr[rpng_color]
|
|
21
|
+
|
|
22
|
+
external function rpng_load_image(filename: cstr, width: ptr[int], height: ptr[int], color_channels: ptr[int], bit_depth: ptr[int]) -> ptr[char]
|
|
23
|
+
external function rpng_load_image_indexed(filename: cstr, width: ptr[int], height: ptr[int], palette: ptr[rpng_palette]) -> ptr[char]
|
|
24
|
+
external function rpng_save_image(filename: cstr, data: cstr, width: int, height: int, color_channels: int, bit_depth: int) -> int
|
|
25
|
+
external function rpng_save_image_indexed(filename: cstr, indexed_data: cstr, width: int, height: int, palette: rpng_palette) -> int
|
|
26
|
+
external function rpng_load_image_from_memory(buffer: cstr, width: ptr[int], height: ptr[int], color_channels: ptr[int], bit_depth: ptr[int]) -> ptr[char]
|
|
27
|
+
external function rpng_load_image_indexed_from_memory(buffer: cstr, width: ptr[int], height: ptr[int], palette: ptr[rpng_palette]) -> ptr[char]
|
|
28
|
+
external function rpng_save_image_to_memory(data: cstr, width: int, height: int, color_channels: int, bit_depth: int, output_size: ptr[int]) -> ptr[char]
|
|
29
|
+
external function rpng_save_image_indexed_to_memory(indexed_data: cstr, width: int, height: int, palette: rpng_palette, output_size: ptr[int]) -> ptr[char]
|
|
30
|
+
external function rpng_chunk_count(filename: cstr) -> int
|
|
31
|
+
external function rpng_chunk_read(filename: cstr, chunk_type: cstr) -> rpng_chunk
|
|
32
|
+
external function rpng_chunk_read_all(filename: cstr, count: ptr[int]) -> ptr[rpng_chunk]
|
|
33
|
+
external function rpng_chunk_remove(filename: cstr, chunk_type: cstr) -> void
|
|
34
|
+
external function rpng_chunk_remove_ancillary(filename: cstr) -> void
|
|
35
|
+
external function rpng_chunk_write(filename: cstr, data: rpng_chunk) -> void
|
|
36
|
+
external function rpng_chunk_write_text(filename: cstr, keyword: ptr[char], text: ptr[char]) -> void
|
|
37
|
+
external function rpng_chunk_write_comp_text(filename: cstr, keyword: ptr[char], text: ptr[char]) -> void
|
|
38
|
+
external function rpng_chunk_write_gamma(filename: cstr, gamma: float) -> void
|
|
39
|
+
external function rpng_chunk_write_srgb(filename: cstr, srgb_type: char) -> void
|
|
40
|
+
external function rpng_chunk_write_time(filename: cstr, year: short, month: char, day: char, hour: char, min: char, sec: char) -> void
|
|
41
|
+
external function rpng_chunk_write_physical_size(filename: cstr, pixels_unit_x: int, pixels_unit_y: int, meters: bool) -> void
|
|
42
|
+
external function rpng_chunk_write_chroma(filename: cstr, white_x: float, white_y: float, red_x: float, red_y: float, green_x: float, green_y: float, blue_x: float, blue_y: float) -> void
|
|
43
|
+
external function rpng_chunk_print_info(filename: cstr) -> void
|
|
44
|
+
external function rpng_chunk_check_all_valid(filename: cstr) -> bool
|
|
45
|
+
external function rpng_chunk_combine_image_data(filename: cstr) -> void
|
|
46
|
+
external function rpng_chunk_split_image_data(filename: cstr, split_size: int) -> void
|
|
47
|
+
external function rpng_chunk_count_from_memory(buffer: cstr) -> int
|
|
48
|
+
external function rpng_chunk_read_from_memory(buffer: cstr, chunk_type: cstr) -> rpng_chunk
|
|
49
|
+
external function rpng_chunk_read_all_from_memory(buffer: cstr, count: ptr[int]) -> ptr[rpng_chunk]
|
|
50
|
+
external function rpng_chunk_remove_from_memory(buffer: cstr, chunk_type: cstr, output_size: ptr[int]) -> ptr[char]
|
|
51
|
+
external function rpng_chunk_remove_ancillary_from_memory(buffer: cstr, output_size: ptr[int]) -> ptr[char]
|
|
52
|
+
external function rpng_chunk_write_from_memory(buffer: cstr, chunk: rpng_chunk, output_size: ptr[int]) -> ptr[char]
|
|
53
|
+
external function rpng_chunk_combine_image_data_from_memory(buffer: ptr[char], output_size: ptr[int]) -> ptr[char]
|
|
54
|
+
external function rpng_chunk_split_image_data_from_memory(buffer: ptr[char], split_size: int, output_size: ptr[int]) -> ptr[char]
|
|
55
|
+
|
|
56
|
+
const RPNG_MAX_CHUNKS_COUNT: int = 64
|
|
57
|
+
const RPNG_SUCCESS: int = 0
|
|
58
|
+
const RPNG_ERROR_FILE_OPEN: int = 1
|
|
59
|
+
const RPNG_ERROR_PIXEL_FORMAT: int = 2
|
|
60
|
+
const RPNG_ERROR_MEMORY_ALLOC: int = 3
|