-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
2193 lines (1156 loc) · 48.8 KB
/
README
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
NAME
Raylib::FFI - Perl FFI bindings for raylib
SYNOPSIS
use 5.38.2;
use lib qw(lib);
use Raylib::FFI; # defaults to exporting all the functions
use constant Color => 'Raylib::FFI::Color';
InitWindow( 800, 600, "Testing!" );
SetTargetFPS(60);
while ( !WindowShouldClose() ) {
my $x = GetScreenWidth() / 2;
my $y = GetScreenHeight() / 2;
BeginDrawing();
ClearBackground( Color->new( r => 0, g => 0, b => 0, a => 0 ) );
DrawFPS( 0, 0 );
DrawText( "Hello, world!",
$x, $y, 20, Color->new( r => 255, g => 255, b => 255, a => 255 ) );
EndDrawing();
}
CloseWindow();
DESCRIPTION
This module provides Perl bindings for the raylib library using
FFI::Platyus. This is functional but very low level. You probably want
to use Raylib::App instead.
This module was based on the Raylib 5.0.0 API. See
http://www.raylib.com.
TYPES
Raylib::FFI::Vector2D
X and Y coordinates
Raylib::FFI::Vector3D
X, Y and Z coordinates
Raylib::FFI::Vector4D
X, Y, Z and W coordinates
Raylib::FFI::Matrix
Matrix, 4x4 components, column major, OpenGL style, right-handed
Raylib::FFI::Color
Color, 4 components, R8G8B8A8 (32bit)
Raylib::FFI::Rectangle
Rectangle, 4 components
Raylib::FFI::Image
Image, pixel data stored in CPU memory (RAM)
Raylib::FFI::Texture
Texture, tex data stored in GPU memory (VRAM)
Raylib::FFI::RenderTexture
RenderTexture, fbo for texture rendering
Raylib::FFI::NPatchInfo
NPatchInfo, n-patch layout info
Raylib::FFI::GlyphInfo
GlyphInfo, font characters glyphs info
Raylib::FFI::Font
Font, font texture and characters glyphs info
Raylib::FFI::Camera3D
Camera3D, defines a camera position/orientation in 3D space
Raylib::FFI::Camera2D
Camera2D, defines a camera position and rotation in 2D space
Raylib::FFI::Mesh
Mesh, vertext data and vao/vbo
Raylib::FFI::Shader
Shader
Raylib::FFI::MaterialMap
MaterialMap
Raylib::FFI::Material
Material, includes shader and maps
Raylib::FFI::Transform
Transform, vertex transformation data
Raylib::FFI::BoneInfo
Bone, skeletal animation bone
Raylib::FFI::Model
Model, meshes, materials and animation data
Raylib::FFI::ModelAnimation
ModelAnimation, animation data
Raylib::FFI::Ray
Ray, ray for raycasting
Raylib::FFI::RayCollision
RayCollision, ray hit information
Raylib::FFI::BoundingBox
Bounding Box
Raylib::FFI::Wave
Wave, audio wave data
Raylib::FFI::AudioStream
AudioStream, custom audio stream
Raylib::FFI::Sound
Sound
Raylib::FFI::Music
Music, audio stream, anything longer than ~10 seconds should be
streamed
Raylib::FFI::VrDeviceInfo
VrDeviceInfo, Head-Mounted-Display device parameters
Raylib::FFI::VrStereoConfig
VrStereoConfig, VR stereo rendering configuration for simulator
FUNCTIONS
All functions are exported lexically by default. To export only
specific functions simply liste them in the use statement.
InitWindow( $width, $height, $title )
Initialize window and OpenGL context.
CloseWindow()
Close window and unload OpenGL context.
WindowShouldClose() : bool
Check if application should close (KEY_ESCAPE pressed or windows close
icon clicked).
IsWindowValid() : bool
Check if window has been initialized successfully.
IsWindowFullscreen() : bool
Check if window is currently fullscreen.
IsWindowHidden() : bool
Check if window is currently hidden.
IsWindowMinimized() : bool
Check if window is currently minimized.
IsWindowMaximized() : bool
Check if window is currently maximized.
IsWindowFocused() : bool
Check if window is currently focused.
IsWindowResized() : bool
Check if window has been resized last frame.
IsWindowState( $flag ) : bool
Check if one specific window flag is enabled.
SetWindowState( $flags )
Set window configuration state using flags.
ClearWindowState( $flags )
Clear window configuration state flags.
ToggleFullscreen()
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP).
ToggleBorderlessWindowed()
Toggle window state: borderless/fullscreen (only PLATFORM_DESKTOP).
MaximizeWindow()
Set window state: maximized, if resizable (only PLATFORM_DESKTOP).
MinimizeWindow()
Set window state: minimized, if resizable (only PLATFORM_DESKTOP).
RestoreWindow()
Restore window state: if resizable (only PLATFORM_DESKTOP).
SetWindowIcon( $image )
Set icon for window (single image, RBGA 32bit, only PLATFORM_DESKTOP).
SetWindowIcons( $images )
Set icons for window (multiple images, RGBA 32bit, only
PLATFORM_DESKTOP).
SetWindowTitle( $title )
Set title for window (only PLATFORM_DESKTOP).
SetWindowPosition( $x, $y )
Set window position on screen (only PLATFORM_DESKTOP).
SetWindowMonitor( $monitor )
Set monitor for the current window.
SetWindowMinSize( $width, $height )
Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE).
SetWindowMaxSize( $width, $height )
Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE).
SetWindowSize( $width, $height )
Set window dimensions.
SetWindowOpacity( $opacity )
Set window opacity [0.0f..1.0f]
SetWindowFocused()
Set window focused
GetScreenWidth() : int
Get current screen width.
GetScreenHeight() : int
Get current screen height.
GetRenderWidth() : int
Get current render width (it considers HiDPI).
GetRenderHeight() : int
Get current render height (it considers HiDPI).
GetMonitorCount() : int
Get number of connected monitors.
GetCurrentMonitor() : int
Get current connected monitor.
GetMonitorPosition( $monitor ) : Raylib::FFI::Vector2D
Get specified monitor position in screen space.
GetMonitorWidth( $monitor ) : int
Get specified monitor width (current video mode used by monitor).
GetMonitorHeight( $monitor ) : int
Get specified monitor height (current video mode used by monitor).
GetMonitorPhysicalWidth( $monitor ) : int
Get specified monitor physical width in millimetres.
GetMonitorPhysicalHeight( $monitor ) : int
Get specified monitor physical height in millimetres.
GetMonitorRefreshRate( $monitor ) : int
Get specified monitor refresh rate.
GetWindowPosition() : Raylib::FFI::Vector2D
Get window position XY on monitor.
GetWindowScaleDPI() : Raylib::FFI::Vector2D
Get window scale factor on HiDPI monitors.
GetMonitorName( $monitor ) : string
Get the human-readable, UTF-8 encoded name of the monitor.
SetClipboardText( $text )
Set clipboard text content.
GetClipboardText() : string
Get clipboard text content.
GetClipboardImage() : Raylib::FFI::Image
Get clipboard image content.
EnableEventWaiting()
Enable waiting for events on EndDrawing, automatic event polling.
DisableEventWaiting()
Disable waiting for events on EndDrawing, manual event polling.
ShowCursor()
Show cursor.
HideCursor()
Hide cursor.
IsCursorHidden() : bool
Check if cursor is not visible.
EnableCursor()
Enable cursor (unlock cursor).
DisableCursor()
Disable cursor (lock cursor).
IsCursorOnScreen() : bool
Check if cursor is on the screen.
ClearBackground( $color )
Set background color (framebuffer clear color).
BeginDrawing()
Setup canvas (framebuffer) to start drawing
EndDrawing()
End canvas drawing and swap buffers (double buffering).
BeginMode2D( $camera )
Begin 2D mode with custom camera (2D).
EndMode2D()
Ends 2D mode with custom camera.
BeginMode3D( $camera )
Begin 3D mode with custom camera (3D).
EndMode3D()
Ends 3D mode and returns to default 2D orthographic mode.
BeginTextureMode( $renderTexture )
Begin drawing to render texture.
EndTextureMode()
Ends drawing to render texture.
BeginShaderMode( $shader )
Begin custom shader drawing.
EndShaderMode()
End custom shader drawing (use default shader).
BeginBlendMode( $mode )
Begin blending mode (alpha, additive, multiplied, subtract, custom)
EndBlendMode()
End blending mode (reset to default: alpha blending)
BeginScissorMode( $x, $y, $width, $height )
Begin scissor mode (define screen area for following drawing
operations)
EndScissorMode()
End scissor mode.
BeginVrStereoMode( $config )
Begin stereo rendering (requires VR simulator)
EndVrStereoMode()
End stereo rendering.
LoadVrStereoConfig( $config )
Load VR stereo config for VR simulator.
UnloadVrStereoConfig( $config )
Unload VR stereo config for VR simulator.
LoadShader( $vsFileName, $fsFileName ) : Raylib::FFI::Shader
Load shader from files and bind default locations.
LoadShaderFromMemory( $vsCode, $fsCode ) : Raylib::FFI::Shader
Load shader from code strings and bind default locations.
IsShaderValid( $shader ) : bool
Check if a shader is valid.
GetShaderLocation( $shader, $uniformName ) : int
Get shader uniform location.
GetShaderLocationAttrib( $shader, $attribName ) : int
Get shader attribute location.
SetShaderValue( $shader, $locIndex, $value, $uniformType )
Set shader uniform value
SetShaderValueV( $shader, $locIndex, $value, $uniformType )
Set shader uniform value vector
SetShaderValueMatrix( $shader, $locIndex, $matrix )
Set shader uniform value matrix (matrix 4x4)
SetShaderValueTexture( $shader, $locIndex, $texture )
Set shader uniform value for texture (sampler2d)
UnloadShader( $shader )
Unload shader from GPU memory (VRAM).
GetMouseRay( $position, $camera ) : Raylib::FFI::Ray # DEPRECATED
Get a ray trace from screen space (i.e. mouse position)
GetWorldToScreenEx( $position, $camera, $width, $height ) :
Raylib::FFI::Vector2D
Get size position for a 3d world space position
GetWorldToScreen2D( $position, $camera) : Raylib::FFI::Vector2D
Get the screen space position for a 2d camera world space position
GetScreenToWorld2D( $position, $camera) : Raylib::FFI::Vector2D;
Get the world space position for a 2d camera screen space position
GetCameraMatrix( $camera ) : Raylib::FFI::Matrix;
Get camera transform matrix (view matrix)
GetCameraMatrix2D( $camera ) : Raylib::FFI::Matrix;
Get camera 2d transform matrix
SetTargetFPS( $fps )
Set target FPS (maximum)
GetFrameTime() : float
Get time in seconds for last frame drawn (delta time)
GetTime() : double
Get elapsed time in seconds since InitWindow()
GetFPS() : int
Get current FPS
SwapScreenBuffer()
NOTE: This function is intended for advanced users that want full
control over the frame processing. default EndDrawing() does this job:
draws everything + SwapScreenBuffer() + manage frame timing +
PollInputEvents(). To avoid that behaviour and control frame processes
manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
Swap backbuffer with frontbuffer (screen drawing)
PollInputEvents()
NOTE: This function is intended for advanced users that want full
control over the frame processing. default EndDrawing() does this job:
draws everything + SwapScreenBuffer() + manage frame timing +
PollInputEvents(). To avoid that behaviour and control frame processes
manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
Register all input events
WaitTime( $seconds )
NOTE: This function is intended for advanced users that want full
control over the frame processing. default EndDrawing() does this job:
draws everything + SwapScreenBuffer() + manage frame timing +
PollInputEvents(). To avoid that behaviour and control frame processes
manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
Wait for some time (halt program execution)
TakeScreenshot( $fileName )
Takes a screenshot of current screen (filename extension defines
format)
SetConfigFlags( $flags )
Setup init configuration flags (view FLAGS)
OpenURL( $url )
Open URL with default system browser (if available)
TraceLog( $logLevel, $text )
Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING,
LOG_ERROR...)
SetTraceLogLevel( $logLevel )
Set the current threshold (minimum) log level
IsKeyPressed( $key ) : bool
Check if a key has been pressed once
IsKeyPressedRepeat( $key ) : bool
Check if a key has been pressed again (Only PLATFORM_DESKTOP)
IsKeyDown( $key ) : bool
Check if a key is being pressed
IsKeyReleased( $key ) : bool
Check if a key has been released once
IsKeyUp( $key ) : bool
Check if a key is NOT being pressed
GetKeyPressed() : int
Get latest key pressed. Returns 0 if no key was pressed during the last
frame
GetCharPressed() : int
Get char pressed (unicode), call it multiple times for chars queued,
returns 0 when the queue is empty
SetExitKey( $key )
Set a custom key to exit program (default is ESC)
IsGamepadAvailable( $gamepad ) : bool
Check if a gamepad is available
GetGamepadName( $gamepad ) : string
Get gamepad internal name id
IsGamepadButtonPressed( $gamepad, $button ) : bool
Check if a gamepad button has been pressed once
IsGamepadButtonDown( $gamepad, $button ) : bool
Check if a gamepad button is being pressed
IsGamepadButtonReleased( $gamepad, $button ) : bool
Check if a gamepad button has been released once
IsGamepadButtonUp( $gamepad, $button ) : bool
Check if a gamepad button is NOT being pressed
GetGamepadButtonPressed() : int
Get the last gamepad button pressed
GetGamepadAxisCount( $gamepad ) : int
Get gamepad axis count for a gamepad
GetGamepadAxisMovement( $gamepad, $axis ) : float
Get axis movement value for a gamepad axis
SetGamepadMappings( $mappings )
Set internal gamepad mappings
IsMouseButtonPressed( $button ) : bool
Check if a mouse button has been pressed once
IsMouseButtonDown( $button ) : bool
Check if a mouse button is being pressed
IsMouseButtonReleased( $button ) : bool
Check if a mouse button has been released once
IsMouseButtonUp( $button ) : bool
Check if a mouse button is NOT being pressed
GetMouseX() : int
Get mouse position X
GetMouseY() : int
Get mouse position Y
GetMousePosition() : Raylib::FFI::Vector2D
Get mouse position XY
GetMouseDelta() : Raylib::FFI::Vector2D
Get mouse delta between frames
SetMousePosition( $x, $y )
Set mouse position XY
SetMouseOffset( $offsetX, $offsetY )
Set mouse offset
SetMouseScale( $scaleX, $scaleY )
Set mouse scaling
GetMouseWheelMove() : int
Get mouse wheel movement for X or Y, whichever is larger
GetMouseWheelMoveV() : Raylib::FFI::Vector2D
Get mouse wheel movement for both X and Y
SetMouseCursor( $cursor )
Set mouse cursor
GetTouchX() : int
Get touch position X for touch point 0 (relative to screen size).
GetTouchY() : int
Get touch position Y for touch point 0 (relative to screen size).
GetTouchPosition( $index ) : Raylib::FFI::Vector2D
Get touch position XY for a touch point index (relative to screen
size).
GetTouchPointId( $index ) : int
Get touch point identifier for given index.
GetTouchPointCount() : int
Get number of touch points
SetGesturesEnabled( $flags )
Enable a set of gestures using flags
IsGestureDetected( $gesture ) : bool
Check if a gesture have been detected
GetGestureDetected() : int
Get latest detected gesture
GetGestureHoldDuration() : float
Get gesture hold time in milliseconds
GetGestureDragVector() : Raylib::FFI::Vector2D
Get gesture drag vector
GetGestureDragAngle() : float
Get gesture drag angle
GetGesturePinchVector() : Raylib::FFI::Vector2D
Get gesture pinch delta
GetGesturePinchAngle() : float
Get gesture pinch angle
UpdateCamera( $camera )
Update camera position for selected mode
UpdateCameraPro( $camera, $dest, $rotation, $zoom )
Uppdate camera movement/rotation
SetShapesTexture( $texture, $rec )
Set texture and rectangle to be used on shapes drawing
GetShapesTextureRec() : Raylib::FF::Rectangle
Get texture rectangle to be used on shapes drawing
DrawPixel( $posX, $posY, $color )
Draw a pixel
DrawPixelV( $position, $color )
Draw a pixel (Vector version)
DrawLine( $startPosX, $startPosY, $endPosX, $endPosY, $color )
Draw a line
DrawLineV( $startPos, $endPos, $color )
Draw a line (using gl lines)
DrawLineEx( $startPos, $endPos, $thick, $color )
Draw a line (using triangles/quads)
DrawLineStrip( $points, $pointCount, $color )
Draw lines sequence (using gl lines)
DrawLineBezier( $startPos, $endPos, $thick, $color )
Draw line segment cubic-bezier in-out interpolation
DrawCircle( $centerX, $centerY, $radius, $color )
Draw a color-filled circle
DrawCircleSector( $center, $radius, $startAngle, $endAngle, $segments,
$color )
Draw a piece of a circle
DrawCircleSectorLines( $center, $radius, $startAngle, $endAngle,
$segments, $color )
Draw circle sector outline
DrawCircleGradient( $centerX, $centerY, $radius, $color1, $color2 )
Draw a gradient-filled circle
DrawCircleV( $center, $radius, $color )
Draw a color-filled circle (Vector version)
DrawCircleLines( $centerX, $centerY, $radius, $color )
Draw circle outline
DrawCircleLinesV( $center, $radius, $color )
Draw circle outline (Vector version)
DrawEllipse( $centerX, $centerY, $radiusH, $radiusV, $color )
Draw ellipse
DrawEllipseLines( $centerX, $centerY, $radiusH, $radiusV, $color )
Draw ellipse outline
DrawRing( $center, $innerRadius, $outerRadius, $startAngle, $endAngle,
$segments, $color )
Draw ring
DrawRingLines( $center, $innerRadius, $outerRadius, $startAngle,
$endAngle, $segments, $color )
Draw ring outline
DrawRectangle( $posX, $posY, $width, $height, $color )
Draw a color-filled rectangle
DrawRectangleV( $position, $size, $color )
Draw a color-filled rectangle (Vector version)
DrawRectangleRec( $rec, $color )
Draw a color-filled rectangle
DrawRectanglePro( $rec, $origin, $rotation, $color )
Draw a color-filled rectangle with pro parameters
DrawRectangleGradientV( $posX, $posY, $width, $height, $color1, $color2 )
Draw a vertical-gradient-filled rectangle
DrawRectangleGradientH( $posX, $posY, $width, $height, $color1, $color2 )
Draw a horizontal-gradient-filled rectangle
DrawRectangleGradientEx( $rec, $col1, $col2, $col3, $col4 )
Draw a gradient-filled rectangle with custom vertex colors
DrawRectangleLines( $posX, $posY, $width, $height, $color )
Draw rectangle outline
DrawRectangleLinesEx( $rec, $lineThick, $color )
Draw rectangle outline with extended parameters
DrawRectangleRounded( $rec, $roundness, $segments, $color )
Draw rectangle with rounded edges
DrawRectangleRoundedLines( $rec, $roundness, $segments, $lineThick, $color
)
Draw rectangle lines with rounded edges
DrawTriangle( $v1, $v2, $v3 )
Draw a color-filled triangle (vertex in counter-clockwise order!)
DrawTriangleLines( $v1, $v2, $v3 )
Draw triangle outline (vertex in counter-clockwise order!)
DrawTriangleFan( $points, $pointCount )
Draw a triangle fan defined by points (first vertex is the center)
DrawTriangleStrip( $points, $pointCount )
Draw a triangle strip defined by points
DrawPoly( $center, $sides, $radius, $rotation, $color )
Draw a regular polygon (Vector version)
DrawPolyLines( $center, $sides, $radius, $rotation, $color )
Draw a polygon outline of n sides
DrawPolyLinesEx( $center, $sides, $radius, $rotation, $lineThick, $color )
Draw a polygon outline of n sides with extended parameters
DrawSplineLinear( $points, $pointCount, $color )
Draw spline: Linear, minimum 2 points
DrawSplineBasis( $points, $pointCount, $color )
Draw spline: B-Spline, minimum 4 points
DrawSplineCatmullRom( $points, $pointCount, $color )
Draw spline: Catmull-Rom, minimum 4 points
DrawSplineBezierQuadratic( $points, $pointCount, $color )
Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1,
c2, p3, c4...]
DrawSplineBezierCubic( $points, $pointCount, $color )
Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1,
c2, c3, p4, c5, c6...]
DrawSplineSegmentLinear( $p1, $p2, $color )
Draw spline segment: Linear, 2 points
DrawSplineSegmentBasis( $p1, $p2, $color )
Draw spline segment: B-Spline, 4 points
DrawSplineSegmentCatmullRom( $p1, $p2, $color )
Draw spline segment: Catmull-Rom, 4 points
DrawSplineSegmentBezierQuadratic( $p1, $p2, $p3, $color )
Draw spline segment: Quadratic Bezier, 2 points, 1 control point
DrawSplineSegmentBezierCubic( $p1, $p2, $p3, $p4, $color )
Draw spline segment: Cubic Bezier, 2 points, 2 control points
GetSplinePointLinear( $points, $pointCount, $t ) : Raylib::FFI::Vector2D
Get (evaluate) spline point: Linear Spline segment point evaluation
functions, for a given t [0.0f .. 1.0f]
GetSplinePointBasis( $points, $pointCount, $t ) : Raylib::FFI::Vector2D
Get (evaluate) spline point: B-Spline Spline segment point evaluation
functions, for a given t [0.0f .. 1.0f]
GetSplinePointCatmullRom( $points, $pointCount, $t ) :
Raylib::FFI::Vector2D
Get (evaluate) spline point: Catmull-Rom Spline segment point
evaluation functions, for a given t [0.0f .. 1.0f]