-
Notifications
You must be signed in to change notification settings - Fork 8
/
raylib.bi
1402 lines (1303 loc) · 64.5 KB
/
raylib.bi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#pragma once
#include once "crt/long.bi"
#include once "crt/stdarg.bi"
'' The following symbols have been renamed:
'' struct Color => RLColor
#inclib "raylib"
#if defined(__FB_CYGWIN__) or defined(__FB_LINUX__) or defined(__FB_FREEBSD__) or defined(__FB_OPENBSD__) or defined(__FB_NETBSD__)
#inclib "GL"
#inclib "X11"
#endif
#ifdef __FB_LINUX__
#inclib "dl"
#inclib "rt"
#elseif defined(__FB_CYGWIN__) or defined(__FB_FREEBSD__) or defined(__FB_OPENBSD__) or defined(__FB_NETBSD__)
#inclib "Xrandr"
#inclib "Xinerama"
#inclib "Xi"
#inclib "Xxf86vm"
#inclib "Xcursor"
#elseif defined(__FB_DARWIN__)
#inclib "OpenGL"
#inclib "Cocoa"
#elseif defined(__FB_WIN32__)
#inclib "opengl32"
#inclib "gdi32"
#inclib "winmm"
#endif
extern "C"
#define RAYLIB_H
const RAYLIB_VERSION_MAJOR = 5
const RAYLIB_VERSION_MINOR = 0
const RAYLIB_VERSION_PATCH = 0
#define RAYLIB_VERSION "5.0"
#ifndef PI
const PI = 3.14159265358979323846
#endif
const DEG2RAD = PI / 180.0f
const RAD2DEG = 180.0f / PI
#define RL_MALLOC(sz) malloc(sz)
#define RL_CALLOC(n, sz) calloc(n, sz)
#define RL_REALLOC(ptr, sz) realloc(ptr, sz)
#define RL_FREE(ptr) free(ptr)
#define RL_COLOR_TYPE
#define RL_RECTANGLE_TYPE
#define RL_VECTOR2_TYPE
#define RL_VECTOR3_TYPE
#define RL_VECTOR4_TYPE
#define RL_QUATERNION_TYPE
#define RL_MATRIX_TYPE
#define LIGHTGRAY RLColor( 200, 200, 200, 255 )
#define GRAY RLColor( 130, 130, 130, 255 )
#define DARKGRAY RLColor( 80, 80, 80, 255 )
#define YELLOW RLColor( 253, 249, 0, 255 )
#define GOLD RLColor( 255, 203, 0, 255 )
#define ORANGE RLColor( 255, 161, 0, 255 )
#define PINK RLColor( 255, 109, 194, 255 )
#define RED RLColor( 230, 41, 55, 255 )
#define MAROON RLColor( 190, 33, 55, 255 )
#define GREEN RLColor( 0, 228, 48, 255 )
#define LIME RLColor( 0, 158, 47, 255 )
#define DARKGREEN RLColor( 0, 117, 44, 255 )
#define SKYBLUE RLColor( 102, 191, 255, 255 )
#define BLUE RLColor( 0, 121, 241, 255 )
#define DARKBLUE RLColor( 0, 82, 172, 255 )
#define PURPLE RLColor( 200, 122, 255, 255 )
#define VIOLET RLColor( 135, 60, 190, 255 )
#define DARKPURPLE RLColor( 112, 31, 126, 255 )
#define BEIGE RLColor( 211, 176, 131, 255 )
#define BROWN RLColor( 127, 106, 79, 255 )
#define DARKBROWN RLColor( 76, 63, 47, 255 )
#define WHITE RLColor( 255, 255, 255, 255 )
#define BLACK RLColor( 0, 0, 0, 255 )
#define BLANK RLColor( 0, 0, 0, 0 )
#define MAGENTA RLColor( 255, 0, 255, 255 )
#define RAYWHITE RLColor( 245, 245, 245, 255 )
#ifndef Vector2
type Vector2
x as single
y as single
declare constructor()
declare constructor(x as single, y as single)
end type
constructor Vector2(x as single, y as single)
this.x = x
this.y = y
end constructor
constructor Vector2()
end constructor
#endif
#ifndef Vector3
type Vector3
x as single
y as single
z as single
declare constructor()
declare constructor(x as single, y as single, z as single)
end type
constructor Vector3()
end constructor
constructor Vector3(x as single, y as single, z as single)
this.x = x
this.y = y
this.z = z
end constructor
#endif
#ifndef Vector4
type Vector4
x as single
y as single
z as single
w as single
declare constructor()
declare constructor(x as single, y as single, z as single, w as single)
end type
constructor Vector4()
end constructor
constructor Vector4(x as single, y as single, z as single, w as single)
this.x = x
this.y = y
this.z = z
this.w = w
end constructor
#endif
#ifndef Quaternion
type Quaternion as Vector4
#endif
#ifndef Matrix
type Matrix
m0 as single
m4 as single
m8 as single
m12 as single
m1 as single
m5 as single
m9 as single
m13 as single
m2 as single
m6 as single
m10 as single
m14 as single
m3 as single
m7 as single
m11 as single
m15 as single
end type
#endif
type RLColor
r as ubyte
g as ubyte
b as ubyte
a as ubyte
declare constructor()
declare constructor(r as ubyte, g as ubyte, b as ubyte, a as ubyte)
end type
constructor RLColor(r as ubyte, g as ubyte, b as ubyte, a as ubyte)
this.r = r
this.g = g
this.b = b
this.a = a
end constructor
constructor RLColor()
end constructor
type Rectangle
x as single
y as single
width_ as single
height_ as single
declare constructor()
declare constructor(x as single, y as single, width_ as single, height_ as single)
end type
constructor Rectangle()
end constructor
constructor Rectangle(x as single, y as single, width_ as single, height_ as single)
this.x = x
this.y = y
this.width_ = width_
this.height_ = height_
end constructor
type Image
data_ as any ptr
width_ as long
height_ as long
mipmaps as long
format_ as long
end type
type Texture
id as ulong
width_ as long
height_ as long
mipmaps as long
format_ as long
end type
type Texture2D as Texture
type TextureCubemap as Texture
type RenderTexture
id as ulong
texture as Texture
depth as Texture
end type
type RenderTexture2D as RenderTexture
type NPatchInfo
source as Rectangle
left_ as long
top as long
right_ as long
bottom as long
layout as long
end type
type GlyphInfo
value as long
offsetX as long
offsetY as long
advanceX as long
image_ as Image
end type
type Font
baseSize as long
glyphCount as long
glyphPadding as long
texture as Texture2D
recs as Rectangle ptr
glyphs as GlyphInfo ptr
end type
type Camera3D
position as Vector3
target as Vector3
up as Vector3
fovy as single
projection as long
declare constructor()
declare constructor(position as Vector3, target as Vector3, up as Vector3, fovy as single, projection as long)
end type
constructor Camera3D()
end constructor
constructor Camera3D(position as Vector3, target as Vector3, up as Vector3, fovy as single, projection as long)
this.position = position
this.target = target
this.up = up
this.fovy = fovy
this.projection = projection
end constructor
type Camera as Camera3D
type Camera2D
offset as Vector2
target as Vector2
rotation as single
zoom as single
declare constructor()
declare constructor(offset as Vector2, target as Vector2, rototation as single, zoom as single)
end type
constructor Camera2D()
end constructor
constructor Camera2D(offset as Vector2, target as Vector2, rotation as single, zoom as single)
this.offset = offset
this.target = target
this.rotation = rotation
this.zoom = zoom
end constructor
type Mesh
vertexCount as long
triangleCount as long
vertices as single ptr
texcoords as single ptr
texcoords2 as single ptr
normals as single ptr
tangents as single ptr
colors as ubyte ptr
indices as ushort ptr
animVertices as single ptr
animNormals as single ptr
boneIds as ubyte ptr
boneWeights as single ptr
vaoId as ulong
vboId as ulong ptr
end type
type Shader
id as ulong
locs as long ptr
end type
type MaterialMap
texture as Texture2D
color as RLColor
value as single
end type
type Material
shader as Shader
maps as MaterialMap ptr
params(0 to 3) as single
end type
type Transform
translation as Vector3
rotation as Quaternion
scale as Vector3
end type
type BoneInfo
name_ as zstring * 32
parent as long
end type
type Model
transform as Matrix
meshCount as long
materialCount as long
meshes as Mesh ptr
materials as Material ptr
meshMaterial as long ptr
boneCount as long
bones as BoneInfo ptr
bindPose as Transform ptr
end type
type ModelAnimation
boneCount as long
frameCount as long
bones as BoneInfo ptr
framePoses as Transform ptr ptr
end type
type Ray
position as Vector3
direction as Vector3
end type
type RayCollision
hit as boolean
distance as single
point_ as Vector3
normal as Vector3
end type
type BoundingBox
min as Vector3
max as Vector3
end type
type Wave
frameCount as ulong
sampleRate as ulong
sampleSize as ulong
channels as ulong
data_ as any ptr
end type
type rAudioBuffer as rAudioBuffer_
type rAudioProcessor as rAudioProcessor_
type AudioStream
buffer as rAudioBuffer ptr
processor as rAudioProcessor ptr
sampleRate as ulong
sampleSize as ulong
channels as ulong
end type
type Sound
stream as AudioStream
frameCount as ulong
end type
type Music
stream as AudioStream
frameCount as ulong
looping as boolean
ctxType as long
ctxData as any ptr
end type
type VrDeviceInfo
hResolution as long
vResolution as long
hScreenSize as single
vScreenSize as single
vScreenCenter as single
eyeToScreenDistance as single
lensSeparationDistance as single
interpupillaryDistance as single
lensDistortionValues(0 to 3) as single
chromaAbCorrection(0 to 3) as single
end type
type VrStereoConfig
projection(0 to 1) as Matrix
viewOffset(0 to 1) as Matrix
leftLensCenter(0 to 1) as single
rightLensCenter(0 to 1) as single
leftScreenCenter(0 to 1) as single
rightScreenCenter(0 to 1) as single
scale(0 to 1) as single
scaleIn(0 to 1) as single
end type
type FilePathList
capacity as ulong
count as ulong
paths as zstring ptr ptr
end type
type AutomationEvent
frame as ulong
type_ as ulong
params(0 to 4) as long
end type
type AutomationEventList
capacity as ulong
count as ulong
events as AutomationEvent ptr
end type
type ConfigFlags as long
enum
FLAG_VSYNC_HINT = &h00000040
FLAG_FULLSCREEN_MODE = &h00000002
FLAG_WINDOW_RESIZABLE = &h00000004
FLAG_WINDOW_UNDECORATED = &h00000008
FLAG_WINDOW_HIDDEN = &h00000080
FLAG_WINDOW_MINIMIZED = &h00000200
FLAG_WINDOW_MAXIMIZED = &h00000400
FLAG_WINDOW_UNFOCUSED = &h00000800
FLAG_WINDOW_TOPMOST = &h00001000
FLAG_WINDOW_ALWAYS_RUN = &h00000100
FLAG_WINDOW_TRANSPARENT = &h00000010
FLAG_WINDOW_HIGHDPI = &h00002000
FLAG_WINDOW_MOUSE_PASSTHROUGH = &h00004000
FLAG_MSAA_4X_HINT = &h00000020
FLAG_INTERLACED_HINT = &h00010000
end enum
type TraceLogLevel as long
enum
LOG_ALL = 0
LOG_TRACE
LOG_DEBUG
LOG_INFO
LOG_WARNING
LOG_ERROR
LOG_FATAL
LOG_NONE
end enum
type KeyboardKey as long
enum
KEY_NULL = 0
KEY_APOSTROPHE = 39
KEY_COMMA = 44
KEY_MINUS = 45
KEY_PERIOD = 46
KEY_SLASH = 47
KEY_ZERO = 48
KEY_ONE = 49
KEY_TWO = 50
KEY_THREE = 51
KEY_FOUR = 52
KEY_FIVE = 53
KEY_SIX = 54
KEY_SEVEN = 55
KEY_EIGHT = 56
KEY_NINE = 57
KEY_SEMICOLON = 59
KEY_EQUAL = 61
KEY_A = 65
KEY_B = 66
KEY_C = 67
KEY_D = 68
KEY_E = 69
KEY_F = 70
KEY_G = 71
KEY_H = 72
KEY_I = 73
KEY_J = 74
KEY_K = 75
KEY_L = 76
KEY_M = 77
KEY_N = 78
KEY_O = 79
KEY_P = 80
KEY_Q = 81
KEY_R = 82
KEY_S = 83
KEY_T = 84
KEY_U = 85
KEY_V = 86
KEY_W = 87
KEY_X = 88
KEY_Y = 89
KEY_Z = 90
KEY_LEFT_BRACKET = 91
KEY_BACKSLASH = 92
KEY_RIGHT_BRACKET = 93
KEY_GRAVE = 96
KEY_SPACE = 32
KEY_ESCAPE = 256
KEY_ENTER = 257
KEY_TAB = 258
KEY_BACKSPACE = 259
KEY_INSERT = 260
KEY_DELETE = 261
KEY_RIGHT = 262
KEY_LEFT = 263
KEY_DOWN = 264
KEY_UP = 265
KEY_PAGE_UP = 266
KEY_PAGE_DOWN = 267
KEY_HOME = 268
KEY_END = 269
KEY_CAPS_LOCK = 280
KEY_SCROLL_LOCK = 281
KEY_NUM_LOCK = 282
KEY_PRINT_SCREEN = 283
KEY_PAUSE = 284
KEY_F1 = 290
KEY_F2 = 291
KEY_F3 = 292
KEY_F4 = 293
KEY_F5 = 294
KEY_F6 = 295
KEY_F7 = 296
KEY_F8 = 297
KEY_F9 = 298
KEY_F10 = 299
KEY_F11 = 300
KEY_F12 = 301
KEY_LEFT_SHIFT = 340
KEY_LEFT_CONTROL = 341
KEY_LEFT_ALT = 342
KEY_LEFT_SUPER = 343
KEY_RIGHT_SHIFT = 344
KEY_RIGHT_CONTROL = 345
KEY_RIGHT_ALT = 346
KEY_RIGHT_SUPER = 347
KEY_KB_MENU = 348
KEY_KP_0 = 320
KEY_KP_1 = 321
KEY_KP_2 = 322
KEY_KP_3 = 323
KEY_KP_4 = 324
KEY_KP_5 = 325
KEY_KP_6 = 326
KEY_KP_7 = 327
KEY_KP_8 = 328
KEY_KP_9 = 329
KEY_KP_DECIMAL = 330
KEY_KP_DIVIDE = 331
KEY_KP_MULTIPLY = 332
KEY_KP_SUBTRACT = 333
KEY_KP_ADD = 334
KEY_KP_ENTER = 335
KEY_KP_EQUAL = 336
KEY_BACK = 4
KEY_MENU = 82
KEY_VOLUME_UP = 24
KEY_VOLUME_DOWN = 25
end enum
type MouseButton as long
enum
MOUSE_BUTTON_LEFT = 0
MOUSE_BUTTON_RIGHT = 1
MOUSE_BUTTON_MIDDLE = 2
MOUSE_BUTTON_SIDE = 3
MOUSE_BUTTON_EXTRA = 4
MOUSE_BUTTON_FORWARD = 5
MOUSE_BUTTON_BACK = 6
end enum
const MOUSE_MIDDLE_BUTTON = MOUSE_BUTTON_MIDDLE
const MOUSE_RIGHT_BUTTON = MOUSE_BUTTON_RIGHT
const MOUSE_LEFT_BUTTON = MOUSE_BUTTON_LEFT
type MouseCursor as long
enum
MOUSE_CURSOR_DEFAULT = 0
MOUSE_CURSOR_ARROW = 1
MOUSE_CURSOR_IBEAM = 2
MOUSE_CURSOR_CROSSHAIR = 3
MOUSE_CURSOR_POINTING_HAND = 4
MOUSE_CURSOR_RESIZE_EW = 5
MOUSE_CURSOR_RESIZE_NS = 6
MOUSE_CURSOR_RESIZE_NWSE = 7
MOUSE_CURSOR_RESIZE_NESW = 8
MOUSE_CURSOR_RESIZE_ALL = 9
MOUSE_CURSOR_NOT_ALLOWED = 10
end enum
type GamepadButton as long
enum
GAMEPAD_BUTTON_UNKNOWN = 0
GAMEPAD_BUTTON_LEFT_FACE_UP
GAMEPAD_BUTTON_LEFT_FACE_RIGHT
GAMEPAD_BUTTON_LEFT_FACE_DOWN
GAMEPAD_BUTTON_LEFT_FACE_LEFT
GAMEPAD_BUTTON_RIGHT_FACE_UP
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT
GAMEPAD_BUTTON_RIGHT_FACE_DOWN
GAMEPAD_BUTTON_RIGHT_FACE_LEFT
GAMEPAD_BUTTON_LEFT_TRIGGER_1
GAMEPAD_BUTTON_LEFT_TRIGGER_2
GAMEPAD_BUTTON_RIGHT_TRIGGER_1
GAMEPAD_BUTTON_RIGHT_TRIGGER_2
GAMEPAD_BUTTON_MIDDLE_LEFT
GAMEPAD_BUTTON_MIDDLE
GAMEPAD_BUTTON_MIDDLE_RIGHT
GAMEPAD_BUTTON_LEFT_THUMB
GAMEPAD_BUTTON_RIGHT_THUMB
end enum
type GamepadAxis as long
enum
GAMEPAD_AXIS_LEFT_X = 0
GAMEPAD_AXIS_LEFT_Y = 1
GAMEPAD_AXIS_RIGHT_X = 2
GAMEPAD_AXIS_RIGHT_Y = 3
GAMEPAD_AXIS_LEFT_TRIGGER = 4
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
end enum
type MaterialMapIndex as long
enum
MATERIAL_MAP_ALBEDO = 0
MATERIAL_MAP_METALNESS
MATERIAL_MAP_NORMAL
MATERIAL_MAP_ROUGHNESS
MATERIAL_MAP_OCCLUSION
MATERIAL_MAP_EMISSION
MATERIAL_MAP_HEIGHT
MATERIAL_MAP_CUBEMAP
MATERIAL_MAP_IRRADIANCE
MATERIAL_MAP_PREFILTER
MATERIAL_MAP_BRDF
end enum
const MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDO
const MATERIAL_MAP_SPECULAR = MATERIAL_MAP_METALNESS
type ShaderLocationIndex as long
enum
SHADER_LOC_VERTEX_POSITION = 0
SHADER_LOC_VERTEX_TEXCOORD01
SHADER_LOC_VERTEX_TEXCOORD02
SHADER_LOC_VERTEX_NORMAL
SHADER_LOC_VERTEX_TANGENT
SHADER_LOC_VERTEX_COLOR
SHADER_LOC_MATRIX_MVP
SHADER_LOC_MATRIX_VIEW
SHADER_LOC_MATRIX_PROJECTION
SHADER_LOC_MATRIX_MODEL
SHADER_LOC_MATRIX_NORMAL
SHADER_LOC_VECTOR_VIEW
SHADER_LOC_COLOR_DIFFUSE
SHADER_LOC_COLOR_SPECULAR
SHADER_LOC_COLOR_AMBIENT
SHADER_LOC_MAP_ALBEDO
SHADER_LOC_MAP_METALNESS
SHADER_LOC_MAP_NORMAL
SHADER_LOC_MAP_ROUGHNESS
SHADER_LOC_MAP_OCCLUSION
SHADER_LOC_MAP_EMISSION
SHADER_LOC_MAP_HEIGHT
SHADER_LOC_MAP_CUBEMAP
SHADER_LOC_MAP_IRRADIANCE
SHADER_LOC_MAP_PREFILTER
SHADER_LOC_MAP_BRDF
end enum
const SHADER_LOC_MAP_DIFFUSE = SHADER_LOC_MAP_ALBEDO
const SHADER_LOC_MAP_SPECULAR = SHADER_LOC_MAP_METALNESS
type ShaderUniformDataType as long
enum
SHADER_UNIFORM_FLOAT = 0
SHADER_UNIFORM_VEC2
SHADER_UNIFORM_VEC3
SHADER_UNIFORM_VEC4
SHADER_UNIFORM_INT
SHADER_UNIFORM_IVEC2
SHADER_UNIFORM_IVEC3
SHADER_UNIFORM_IVEC4
SHADER_UNIFORM_SAMPLER2D
end enum
type ShaderAttributeDataType as long
enum
SHADER_ATTRIB_FLOAT = 0
SHADER_ATTRIB_VEC2
SHADER_ATTRIB_VEC3
SHADER_ATTRIB_VEC4
end enum
type PixelFormat as long
enum
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA
PIXELFORMAT_UNCOMPRESSED_R5G6B5
PIXELFORMAT_UNCOMPRESSED_R8G8B8
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4
PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
PIXELFORMAT_UNCOMPRESSED_R32
PIXELFORMAT_UNCOMPRESSED_R32G32B32
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
PIXELFORMAT_UNCOMPRESSED_R16
PIXELFORMAT_UNCOMPRESSED_R16G16B16
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16
PIXELFORMAT_COMPRESSED_DXT1_RGB
PIXELFORMAT_COMPRESSED_DXT1_RGBA
PIXELFORMAT_COMPRESSED_DXT3_RGBA
PIXELFORMAT_COMPRESSED_DXT5_RGBA
PIXELFORMAT_COMPRESSED_ETC1_RGB
PIXELFORMAT_COMPRESSED_ETC2_RGB
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA
PIXELFORMAT_COMPRESSED_PVRT_RGB
PIXELFORMAT_COMPRESSED_PVRT_RGBA
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
end enum
type TextureFilter as long
enum
TEXTURE_FILTER_POINT = 0
TEXTURE_FILTER_BILINEAR
TEXTURE_FILTER_TRILINEAR
TEXTURE_FILTER_ANISOTROPIC_4X
TEXTURE_FILTER_ANISOTROPIC_8X
TEXTURE_FILTER_ANISOTROPIC_16X
end enum
type TextureWrap as long
enum
TEXTURE_WRAP_REPEAT = 0
TEXTURE_WRAP_CLAMP
TEXTURE_WRAP_MIRROR_REPEAT
TEXTURE_WRAP_MIRROR_CLAMP
end enum
type CubemapLayout as long
enum
CUBEMAP_LAYOUT_AUTO_DETECT = 0
CUBEMAP_LAYOUT_LINE_VERTICAL
CUBEMAP_LAYOUT_LINE_HORIZONTAL
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE
CUBEMAP_LAYOUT_PANORAMA
end enum
type FontType as long
enum
FONT_DEFAULT = 0
FONT_BITMAP
FONT_SDF
end enum
type BlendMode as long
enum
BLEND_ALPHA = 0
BLEND_ADDITIVE
BLEND_MULTIPLIED
BLEND_ADD_COLORS
BLEND_SUBTRACT_COLORS
BLEND_ALPHA_PREMULTIPLY
BLEND_CUSTOM
BLEND_CUSTOM_SEPARATE
end enum
type Gesture as long
enum
GESTURE_NONE = 0
GESTURE_TAP = 1
GESTURE_DOUBLETAP = 2
GESTURE_HOLD = 4
GESTURE_DRAG = 8
GESTURE_SWIPE_RIGHT = 16
GESTURE_SWIPE_LEFT = 32
GESTURE_SWIPE_UP = 64
GESTURE_SWIPE_DOWN = 128
GESTURE_PINCH_IN = 256
GESTURE_PINCH_OUT = 512
end enum
type CameraMode as long
enum
CAMERA_CUSTOM = 0
CAMERA_FREE
CAMERA_ORBITAL
CAMERA_FIRST_PERSON
CAMERA_THIRD_PERSON
end enum
type CameraProjection as long
enum
CAMERA_PERSPECTIVE = 0
CAMERA_ORTHOGRAPHIC
end enum
type NPatchLayout as long
enum
NPATCH_NINE_PATCH = 0
NPATCH_THREE_PATCH_VERTICAL
NPATCH_THREE_PATCH_HORIZONTAL
end enum
type TraceLogCallback as sub(byval logLevel as long, byval text as const zstring ptr, byval args as va_list)
type LoadFileDataCallback as function(byval fileName as const zstring ptr, byval dataSize as long ptr) as ubyte ptr
type SaveFileDataCallback as function(byval fileName as const zstring ptr, byval data_ as any ptr, byval dataSize as long) as boolean
type LoadFileTextCallback as function(byval fileName as const zstring ptr) as zstring ptr
type SaveFileTextCallback as function(byval fileName as const zstring ptr, byval text as zstring ptr) as boolean
declare sub InitWindow(byval width_ as long, byval height_ as long, byval title as const zstring ptr)
declare function WindowShouldClose() as boolean
declare sub CloseWindow()
declare function IsWindowReady() as boolean
declare function IsWindowFullscreen() as boolean
declare function IsWindowHidden() as boolean
declare function IsWindowMinimized() as boolean
declare function IsWindowMaximized() as boolean
declare function IsWindowFocused() as boolean
declare function IsWindowResized() as boolean
declare function IsWindowState(byval flag as ulong) as boolean
declare sub SetWindowState(byval flags as ulong)
declare sub ClearWindowState(byval flags as ulong)
declare sub ToggleFullscreen()
declare sub ToggleBorderlessWindow()
declare sub MaximizeWindow()
declare sub MinimizeWindow()
declare sub RestoreWindow()
declare sub SetWindowIcon(byval image_ as Image)
declare sub SetWindowIcons(byval images as Image ptr, byval count as long)
declare sub SetWindowTitle(byval title as const zstring ptr)
declare sub SetWindowPosition(byval x as long, byval y as long)
declare sub SetWindowMonitor(byval monitor as long)
declare sub SetWindowMinSize(byval width_ as long, byval height_ as long)
declare sub SetWindowMaxSize(byval width_ as long, byval height_ as long)
declare sub SetWindowSize(byval width_ as long, byval height_ as long)
declare sub SetWindowOpacity(byval opacity as single)
declare sub SetWindowFocused()
declare function GetWindowHandle() as any ptr
declare function GetScreenWidth() as long
declare function GetScreenHeight() as long
declare function GetRenderWidth() as long
declare function GetRenderHeight() as long
declare function GetMonitorCount() as long
declare function GetCurrentMonitor() as long
declare function GetMonitorPosition(byval monitor as long) as Vector2
declare function GetMonitorWidth(byval monitor as long) as long
declare function GetMonitorHeight(byval monitor as long) as long
declare function GetMonitorPhysicalWidth(byval monitor as long) as long
declare function GetMonitorPhysicalHeight(byval monitor as long) as long
declare function GetMonitorRefreshRate(byval monitor as long) as long
declare function GetWindowPosition() as Vector2
declare function GetWindowScaleDPI() as Vector2
declare function GetMonitorName(byval monitor as long) as const zstring ptr
declare sub SetClipboardText(byval text as const zstring ptr)
declare function GetClipboardText() as const zstring ptr
declare sub EnableEventWaiting()
declare sub DisableEventWaiting()
declare sub SwapScreenBuffer()
declare sub PollInputEvents()
declare sub WaitTime(byval seconds as double)
declare sub ShowCursor()
declare sub HideCursor()
declare function IsCursorHidden() as boolean
declare sub EnableCursor()
declare sub DisableCursor()
declare function IsCursorOnScreen() as boolean
declare sub ClearBackground(byval color as RLColor)
declare sub BeginDrawing()
declare sub EndDrawing()
declare sub BeginMode2D(byval camera as Camera2D)
declare sub EndMode2D()
declare sub BeginMode3D(byval camera as Camera3D)
declare sub EndMode3D()
declare sub BeginTextureMode(byval target as RenderTexture2D)
declare sub EndTextureMode()
declare sub BeginShaderMode(byval shader as Shader)
declare sub EndShaderMode()
declare sub BeginBlendMode(byval mode as long)
declare sub EndBlendMode()
declare sub BeginScissorMode(byval x as long, byval y as long, byval width_ as long, byval height_ as long)
declare sub EndScissorMode()
declare sub BeginVrStereoMode(byval config as VrStereoConfig)
declare sub EndVrStereoMode()
declare function LoadVrStereoConfig(byval device as VrDeviceInfo) as VrStereoConfig
declare sub UnloadVrStereoConfig(byval config as VrStereoConfig)
declare function LoadShader(byval vsFileName as const zstring ptr, byval fsFileName as const zstring ptr) as Shader
declare function LoadShaderFromMemory(byval vsCode as const zstring ptr, byval fsCode as const zstring ptr) as Shader
declare function IsShaderReady(byval shader as Shader) as byte
declare function GetShaderLocation(byval shader as Shader, byval uniformName as const zstring ptr) as long
declare function GetShaderLocationAttrib(byval shader as Shader, byval attribName as const zstring ptr) as long
declare sub SetShaderValue(byval shader as Shader, byval locIndex as long, byval value as const any ptr, byval uniformType as long)
declare sub SetShaderValueV(byval shader as Shader, byval locIndex as long, byval value as const any ptr, byval uniformType as long, byval count as long)
declare sub SetShaderValueMatrix(byval shader as Shader, byval locIndex as long, byval mat as Matrix)
declare sub SetShaderValueTexture(byval shader as Shader, byval locIndex as long, byval texture as Texture2D)
declare sub UnloadShader(byval shader as Shader)
declare function GetMouseRay(byval mousePosition as Vector2, byval camera as Camera) as Ray
declare function GetCameraMatrix(byval camera as Camera) as Matrix
declare function GetCameraMatrix2D(byval camera as Camera2D) as Matrix
declare function GetWorldToScreen(byval position as Vector3, byval camera as Camera) as Vector2
declare function GetScreenToWorld2D(byval position as Vector2, byval camera as Camera2D) as Vector2
declare function GetWorldToScreenEx(byval position as Vector3, byval camera as Camera, byval width_ as long, byval height_ as long) as Vector2
declare function GetWorldToScreen2D(byval position as Vector2, byval camera as Camera2D) as Vector2
declare sub SetTargetFPS(byval fps as long)
declare function GetFPS() as long
declare function GetFrameTime() as single
declare function GetTime() as double
declare function GetRandomValue(byval min as long, byval max as long) as long
declare sub SetRandomSeed(byval seed as ulong)
declare sub TakeScreenshot(byval fileName as const zstring ptr)
declare sub SetConfigFlags(byval flags as ulong)
declare sub TraceLog(byval logLevel as long, byval text as const zstring ptr, ...)
declare sub SetTraceLogLevel(byval logLevel as long)
declare function MemAlloc(byval size as long) as any ptr
declare function MemRealloc(byval ptr as any ptr, byval size as long) as any ptr
declare sub MemFree(byval ptr as any ptr)
declare sub OpenURL(byval url as const zstring ptr)
declare sub SetTraceLogCallback(byval callback as TraceLogCallback)
declare sub SetLoadFileDataCallback(byval callback as LoadFileDataCallback)
declare sub SetSaveFileDataCallback(byval callback as SaveFileDataCallback)
declare sub SetLoadFileTextCallback(byval callback as LoadFileTextCallback)
declare sub SetSaveFileTextCallback(byval callback as SaveFileTextCallback)
declare function LoadFileData(byval fileName as const zstring ptr, byval dataSize as long ptr) as ubyte ptr
declare sub UnloadFileData(byval data_ as ubyte ptr)
declare function SaveFileData(byval fileName as const zstring ptr, byval data_ as any ptr, byval dataSize as long) as boolean
declare function ExportDataAsCode(byval data_ as const zstring ptr, byval dataSize as long, byval fileName as const zstring ptr) as boolean
declare function LoadFileText(byval fileName as const zstring ptr) as zstring ptr
declare sub UnloadFileText(byval text as zstring ptr)
declare function SaveFileText(byval fileName as const zstring ptr, byval text as zstring ptr) as boolean
declare function FileExists(byval fileName as const zstring ptr) as boolean
declare function DirectoryExists(byval dirPath as const zstring ptr) as boolean
declare function IsFileExtension(byval fileName as const zstring ptr, byval ext as const zstring ptr) as boolean
declare function GetFileLength(byval fileName as const zstring ptr) as long
declare function GetFileExtension(byval fileName as const zstring ptr) as const zstring ptr
declare function GetFileName(byval filePath as const zstring ptr) as const zstring ptr
declare function GetFileNameWithoutExt(byval filePath as const zstring ptr) as const zstring ptr
declare function GetDirectoryPath(byval filePath as const zstring ptr) as const zstring ptr
declare function GetPrevDirectoryPath(byval dirPath as const zstring ptr) as const zstring ptr
declare function GetWorkingDirectory() as const zstring ptr
declare function GetApplicationDirectory() as const zstring ptr
declare function ChangeDirectory(byval dir_ as const zstring ptr) as boolean
declare function IsPathFile(byval path as const zstring ptr) as boolean
declare function LoadDirectoryFiles(byval dirPath as const zstring ptr) as FilePathList
declare function LoadDirectoryFilesEx(byval basePath as const zstring ptr, byval filter as const zstring ptr, byval scanSubdirs as boolean) as FilePathList
declare sub UnloadDirectoryFiles(byval files as FilePathList)
declare function IsFileDropped() as boolean
declare function LoadDroppedFiles() as FilePathList
declare sub UnloadDroppedFiles(byval files as FilePathList)
declare function GetFileModTime(byval fileName as const zstring ptr) as clong
declare function CompressData(byval data_ as const ubyte ptr, byval dataSize as long, byval compDataSize as long ptr) as ubyte ptr
declare function DecompressData(byval compData as const ubyte ptr, byval compDataSize as long, byval dataSize as long ptr) as ubyte ptr
declare function EncodeDataBase64(byval data_ as const ubyte ptr, byval dataSize as long, byval outputSize as long ptr) as zstring ptr