raylib-bindings 0.7.8-x86_64-darwin → 0.7.10-x86_64-darwin

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.
data/examples/template.rb CHANGED
@@ -1,144 +1,144 @@
1
- # Yet another raylib wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/raylib-bindings
4
- #
5
- # Demonstrates several key features including:
6
- # * Core : window management, camera, etc.
7
- # * Gameplay : fetching player input, collision handling, etc.
8
- # * Rendering : drawing shapes, texts, etc.
9
- #
10
- # To get more information, see:
11
- # * https://www.raylib.com/cheatsheet/cheatsheet.html for API reference
12
- # * https://github.com/vaiorabbit/raylib-bindings/tree/main/examples for more actual codes written in Ruby
13
-
14
- require 'raylib'
15
-
16
- shared_lib_path = Gem::Specification.find_by_name('raylib-bindings').full_gem_path + '/lib/'
17
-
18
- case RUBY_PLATFORM
19
- when /mswin|msys|mingw|cygwin/
20
- Raylib.load_lib(shared_lib_path + 'libraylib.dll', raygui_libpath: shared_lib_path + 'raygui.dll', physac_libpath: shared_lib_path + 'physac.dll')
21
- when /darwin/
22
- arch = RUBY_PLATFORM.split('-')[0]
23
- Raylib.load_lib(shared_lib_path + "libraylib.#{arch}.dylib", raygui_libpath: shared_lib_path + "raygui.#{arch}.dylib", physac_libpath: shared_lib_path + "physac.#{arch}.dylib")
24
- when /linux/
25
- arch = RUBY_PLATFORM.split('-')[0]
26
- Raylib.load_lib(shared_lib_path + "libraylib.#{arch}.so", raygui_libpath: shared_lib_path + "raygui.#{arch}.so", physac_libpath: shared_lib_path + "physac.#{arch}.so")
27
- else
28
- raise RuntimeError, "Unknown OS: #{RUBY_PLATFORM}"
29
- end
30
-
31
- include Raylib
32
-
33
- if __FILE__ == $PROGRAM_NAME
34
- screen_width = 1280
35
- screen_height = 720
36
- InitWindow(screen_width, screen_height, "Yet Another Ruby-raylib bindings")
37
- SetTargetFPS(60)
38
-
39
- ruby_red = Color.from_u8(155, 17, 30, 255)
40
-
41
- # Camera
42
- camera = Camera.new
43
- reset_camera = lambda {
44
- camera.position.set(0.0, 10.0, 10.0)
45
- camera.target.set(0.0, 0.0, 0.0)
46
- camera.up.set(0.0, 1.0, 0.0)
47
- camera.fovy = 45.0
48
- camera.projection = CAMERA_PERSPECTIVE
49
- }
50
- reset_camera.call
51
- camera_mode = CAMERA_CUSTOM
52
- auto_rotate = false
53
-
54
- # Player (red cube) settings
55
- player_pos = Vector3.create(0.0, 0.0, 0.0)
56
- player_size = Vector3.create(2.0, 2.0, 2.0)
57
- speed = 0.25
58
-
59
- # Obstacle settings
60
- obstacle_cube_pos = Vector3.create(-4.0, 1.0, 0.0)
61
- obstacle_cube_size = Vector3.create(2.0, 2.0, 2.0)
62
- obstacle_sphere_pos = Vector3.create(4.0, 0.0, 0.0)
63
- obstacle_sphere_size = 1.5
64
-
65
- until WindowShouldClose()
66
- ### Update phase
67
-
68
- # Reset camera settings
69
- if IsKeyPressed(KEY_F1)
70
- auto_rotate = !auto_rotate
71
- reset_camera.call
72
- camera_mode = auto_rotate ? CAMERA_ORBITAL : CAMERA_CUSTOM
73
- end
74
- UpdateCamera(camera.pointer, camera_mode) if auto_rotate
75
-
76
- # Calculate move direction
77
- move = Vector3.create(0, 0, 0)
78
- move.x += speed if IsKeyDown(KEY_RIGHT)
79
- move.x -= speed if IsKeyDown(KEY_LEFT)
80
- move.z += speed if IsKeyDown(KEY_DOWN)
81
- move.z -= speed if IsKeyDown(KEY_UP)
82
-
83
- to_camera = Vector3Normalize(Vector3.create(camera.position.x, 0, camera.position.z))
84
- rotate_y = QuaternionFromVector3ToVector3(Vector3.create(0, 0, 1), to_camera)
85
- move = Vector3RotateByQuaternion(move, rotate_y)
86
-
87
- player_pos = Vector3Add(player_pos, move)
88
- player_screen_pos = GetWorldToScreen(Vector3.create(player_pos.x, player_pos.y + 2.5, player_pos.z), camera)
89
-
90
- # Check collision status
91
- collision = false
92
-
93
- player_bbox = BoundingBox.new
94
- .with_min(player_pos.x - player_size.x/2, player_pos.y - player_size.y/2, player_pos.z - player_size.z/2)
95
- .with_max(player_pos.x + player_size.x/2, player_pos.y + player_size.y/2, player_pos.z + player_size.z/2)
96
-
97
- obstacle_cube_bbox = BoundingBox.new
98
- .with_min(obstacle_cube_pos.x - obstacle_cube_size.x/2, obstacle_cube_pos.y - obstacle_cube_size.y/2, obstacle_cube_pos.z - obstacle_cube_size.z/2)
99
- .with_max(obstacle_cube_pos.x + obstacle_cube_size.x/2, obstacle_cube_pos.y + obstacle_cube_size.y/2, obstacle_cube_pos.z + obstacle_cube_size.z/2)
100
-
101
- # Check collisions player vs obstacle_cube
102
- collision = true if CheckCollisionBoxes(player_bbox, obstacle_cube_bbox)
103
-
104
- # Check collisions player vs obstacle_sphere
105
- collision = true if CheckCollisionBoxSphere(player_bbox, obstacle_sphere_pos, obstacle_sphere_size)
106
-
107
- ### Rendering phase
108
-
109
- BeginDrawing()
110
-
111
- ClearBackground(RAYWHITE)
112
-
113
- ## 3D scene
114
- BeginMode3D(camera)
115
- # Red cube
116
- DrawCube(player_pos, 2.0, 2.0, 2.0, collision ? Fade(ruby_red, 0.25) : ruby_red)
117
- DrawCubeWires(player_pos, 2.0, 2.0, 2.0, MAROON)
118
- # Obstacle cube
119
- DrawCube(obstacle_cube_pos, obstacle_cube_size.x, obstacle_cube_size.y, obstacle_cube_size.z, GRAY)
120
- DrawCubeWires(obstacle_cube_pos, obstacle_cube_size.x, obstacle_cube_size.y, obstacle_cube_size.z, DARKGRAY)
121
- # Obstacle sphere
122
- DrawSphere(obstacle_sphere_pos, obstacle_sphere_size, GRAY)
123
- DrawSphereWires(obstacle_sphere_pos, obstacle_sphere_size, 16, 16, DARKGRAY)
124
- # Floor
125
- DrawGrid(10, 1)
126
- EndMode3D()
127
-
128
- ## HUD
129
- # Text over the red cube
130
- DrawText("Player HP: 100 / 100", player_screen_pos.x - MeasureText("Player HP: 100/100", 20)/2, player_screen_pos.y, 20, BLACK)
131
- # Help message
132
- DrawRectangle(10, screen_height - 100, 300, 80, Fade(MAROON, 0.25))
133
- DrawRectangleLines(10, screen_height - 100, 300, 80, ruby_red)
134
- DrawText("Arrow keys : move red cube", 20, screen_height - 90, 20, BLACK)
135
- DrawText("F1 : camera rotation", 20, screen_height - 70, 20, BLACK)
136
- DrawText("ESC : exit", 20, screen_height - 50, 20, BLACK)
137
- # FPS
138
- DrawFPS(screen_width - 100, 16)
139
-
140
- EndDrawing()
141
- end
142
-
143
- CloseWindow()
144
- end
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # Demonstrates several key features including:
6
+ # * Core : window management, camera, etc.
7
+ # * Gameplay : fetching player input, collision handling, etc.
8
+ # * Rendering : drawing shapes, texts, etc.
9
+ #
10
+ # To get more information, see:
11
+ # * https://www.raylib.com/cheatsheet/cheatsheet.html for API reference
12
+ # * https://github.com/vaiorabbit/raylib-bindings/tree/main/examples for more actual codes written in Ruby
13
+
14
+ require 'raylib'
15
+
16
+ shared_lib_path = Gem::Specification.find_by_name('raylib-bindings').full_gem_path + '/lib/'
17
+
18
+ case RUBY_PLATFORM
19
+ when /mswin|msys|mingw|cygwin/
20
+ Raylib.load_lib(shared_lib_path + 'libraylib.dll', raygui_libpath: shared_lib_path + 'raygui.dll', physac_libpath: shared_lib_path + 'physac.dll')
21
+ when /darwin/
22
+ arch = RUBY_PLATFORM.split('-')[0]
23
+ Raylib.load_lib(shared_lib_path + "libraylib.#{arch}.dylib", raygui_libpath: shared_lib_path + "raygui.#{arch}.dylib", physac_libpath: shared_lib_path + "physac.#{arch}.dylib")
24
+ when /linux/
25
+ arch = RUBY_PLATFORM.split('-')[0]
26
+ Raylib.load_lib(shared_lib_path + "libraylib.#{arch}.so", raygui_libpath: shared_lib_path + "raygui.#{arch}.so", physac_libpath: shared_lib_path + "physac.#{arch}.so")
27
+ else
28
+ raise RuntimeError, "Unknown OS: #{RUBY_PLATFORM}"
29
+ end
30
+
31
+ include Raylib
32
+
33
+ if __FILE__ == $PROGRAM_NAME
34
+ screen_width = 1280
35
+ screen_height = 720
36
+ InitWindow(screen_width, screen_height, "Yet Another Ruby-raylib bindings")
37
+ SetTargetFPS(60)
38
+
39
+ ruby_red = Color.from_u8(155, 17, 30, 255)
40
+
41
+ # Camera
42
+ camera = Camera.new
43
+ reset_camera = lambda {
44
+ camera.position.set(0.0, 10.0, 10.0)
45
+ camera.target.set(0.0, 0.0, 0.0)
46
+ camera.up.set(0.0, 1.0, 0.0)
47
+ camera.fovy = 45.0
48
+ camera.projection = CAMERA_PERSPECTIVE
49
+ }
50
+ reset_camera.call
51
+ camera_mode = CAMERA_CUSTOM
52
+ auto_rotate = false
53
+
54
+ # Player (red cube) settings
55
+ player_pos = Vector3.create(0.0, 0.0, 0.0)
56
+ player_size = Vector3.create(2.0, 2.0, 2.0)
57
+ speed = 0.25
58
+
59
+ # Obstacle settings
60
+ obstacle_cube_pos = Vector3.create(-4.0, 1.0, 0.0)
61
+ obstacle_cube_size = Vector3.create(2.0, 2.0, 2.0)
62
+ obstacle_sphere_pos = Vector3.create(4.0, 0.0, 0.0)
63
+ obstacle_sphere_size = 1.5
64
+
65
+ until WindowShouldClose()
66
+ ### Update phase
67
+
68
+ # Reset camera settings
69
+ if IsKeyPressed(KEY_F1)
70
+ auto_rotate = !auto_rotate
71
+ reset_camera.call
72
+ camera_mode = auto_rotate ? CAMERA_ORBITAL : CAMERA_CUSTOM
73
+ end
74
+ UpdateCamera(camera.pointer, camera_mode) if auto_rotate
75
+
76
+ # Calculate move direction
77
+ move = Vector3.create(0, 0, 0)
78
+ move.x += speed if IsKeyDown(KEY_RIGHT)
79
+ move.x -= speed if IsKeyDown(KEY_LEFT)
80
+ move.z += speed if IsKeyDown(KEY_DOWN)
81
+ move.z -= speed if IsKeyDown(KEY_UP)
82
+
83
+ to_camera = Vector3Normalize(Vector3.create(camera.position.x, 0, camera.position.z))
84
+ rotate_y = QuaternionFromVector3ToVector3(Vector3.create(0, 0, 1), to_camera)
85
+ move = Vector3RotateByQuaternion(move, rotate_y)
86
+
87
+ player_pos = Vector3Add(player_pos, move)
88
+ player_screen_pos = GetWorldToScreen(Vector3.create(player_pos.x, player_pos.y + 2.5, player_pos.z), camera)
89
+
90
+ # Check collision status
91
+ collision = false
92
+
93
+ player_bbox = BoundingBox.new
94
+ .with_min(player_pos.x - player_size.x/2, player_pos.y - player_size.y/2, player_pos.z - player_size.z/2)
95
+ .with_max(player_pos.x + player_size.x/2, player_pos.y + player_size.y/2, player_pos.z + player_size.z/2)
96
+
97
+ obstacle_cube_bbox = BoundingBox.new
98
+ .with_min(obstacle_cube_pos.x - obstacle_cube_size.x/2, obstacle_cube_pos.y - obstacle_cube_size.y/2, obstacle_cube_pos.z - obstacle_cube_size.z/2)
99
+ .with_max(obstacle_cube_pos.x + obstacle_cube_size.x/2, obstacle_cube_pos.y + obstacle_cube_size.y/2, obstacle_cube_pos.z + obstacle_cube_size.z/2)
100
+
101
+ # Check collisions player vs obstacle_cube
102
+ collision = true if CheckCollisionBoxes(player_bbox, obstacle_cube_bbox)
103
+
104
+ # Check collisions player vs obstacle_sphere
105
+ collision = true if CheckCollisionBoxSphere(player_bbox, obstacle_sphere_pos, obstacle_sphere_size)
106
+
107
+ ### Rendering phase
108
+
109
+ BeginDrawing()
110
+
111
+ ClearBackground(RAYWHITE)
112
+
113
+ ## 3D scene
114
+ BeginMode3D(camera)
115
+ # Red cube
116
+ DrawCube(player_pos, 2.0, 2.0, 2.0, collision ? Fade(ruby_red, 0.25) : ruby_red)
117
+ DrawCubeWires(player_pos, 2.0, 2.0, 2.0, MAROON)
118
+ # Obstacle cube
119
+ DrawCube(obstacle_cube_pos, obstacle_cube_size.x, obstacle_cube_size.y, obstacle_cube_size.z, GRAY)
120
+ DrawCubeWires(obstacle_cube_pos, obstacle_cube_size.x, obstacle_cube_size.y, obstacle_cube_size.z, DARKGRAY)
121
+ # Obstacle sphere
122
+ DrawSphere(obstacle_sphere_pos, obstacle_sphere_size, GRAY)
123
+ DrawSphereWires(obstacle_sphere_pos, obstacle_sphere_size, 16, 16, DARKGRAY)
124
+ # Floor
125
+ DrawGrid(10, 1)
126
+ EndMode3D()
127
+
128
+ ## HUD
129
+ # Text over the red cube
130
+ DrawText("Player HP: 100 / 100", player_screen_pos.x - MeasureText("Player HP: 100/100", 20)/2, player_screen_pos.y, 20, BLACK)
131
+ # Help message
132
+ DrawRectangle(10, screen_height - 100, 300, 80, Fade(MAROON, 0.25))
133
+ DrawRectangleLines(10, screen_height - 100, 300, 80, ruby_red)
134
+ DrawText("Arrow keys : move red cube", 20, screen_height - 90, 20, BLACK)
135
+ DrawText("F1 : camera rotation", 20, screen_height - 70, 20, BLACK)
136
+ DrawText("ESC : exit", 20, screen_height - 50, 20, BLACK)
137
+ # FPS
138
+ DrawFPS(screen_width - 100, 16)
139
+
140
+ EndDrawing()
141
+ end
142
+
143
+ CloseWindow()
144
+ end
data/lib/config.rb CHANGED
@@ -1,111 +1,117 @@
1
- # Yet another raylib wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/raylib-bindings
4
- #
5
- # [NOTICE] Autogenerated. Do not edit.
6
-
7
- require 'ffi'
8
-
9
- module Raylib
10
- extend FFI::Library
11
-
12
- # Define/Macro
13
-
14
- SUPPORT_MODULE_RSHAPES = 1
15
- SUPPORT_MODULE_RTEXTURES = 1
16
- SUPPORT_MODULE_RTEXT = 1 # WARNING: It requires SUPPORT_MODULE_RTEXTURES to load sprite font textures
17
- SUPPORT_MODULE_RMODELS = 1
18
- SUPPORT_MODULE_RAUDIO = 1
19
- SUPPORT_CAMERA_SYSTEM = 1
20
- SUPPORT_GESTURES_SYSTEM = 1
21
- SUPPORT_RPRAND_GENERATOR = 1
22
- SUPPORT_MOUSE_GESTURES = 1
23
- SUPPORT_SSH_KEYBOARD_RPI = 1
24
- SUPPORT_WINMM_HIGHRES_TIMER = 1
25
- SUPPORT_PARTIALBUSY_WAIT_LOOP = 1
26
- SUPPORT_SCREEN_CAPTURE = 1
27
- SUPPORT_GIF_RECORDING = 1
28
- SUPPORT_COMPRESSION_API = 1
29
- SUPPORT_AUTOMATION_EVENTS = 1
30
- MAX_FILEPATH_CAPACITY = 8192 # Maximum file paths capacity
31
- MAX_FILEPATH_LENGTH = 4096 # Maximum length for filepaths (Linux PATH_MAX default value)
32
- MAX_KEYBOARD_KEYS = 512 # Maximum number of keyboard keys supported
33
- MAX_MOUSE_BUTTONS = 8 # Maximum number of mouse buttons supported
34
- MAX_GAMEPADS = 4 # Maximum number of gamepads supported
35
- MAX_GAMEPAD_AXIS = 8 # Maximum number of axis supported (per gamepad)
36
- MAX_GAMEPAD_BUTTONS = 32 # Maximum number of buttons supported (per gamepad)
37
- MAX_GAMEPAD_VIBRATION_TIME = 2.0 # Maximum vibration time in seconds
38
- MAX_TOUCH_POINTS = 8 # Maximum number of touch points supported
39
- MAX_KEY_PRESSED_QUEUE = 16 # Maximum number of keys in the key input queue
40
- MAX_CHAR_PRESSED_QUEUE = 16 # Maximum number of characters in the char input queue
41
- MAX_DECOMPRESSION_SIZE = 64 # Max size allocated for decompression in MB
42
- MAX_AUTOMATION_EVENTS = 16384 # Maximum number of automation events to record
43
- RL_DEFAULT_BATCH_BUFFERS = 1 # Default number of batch buffers (multi-buffering)
44
- RL_DEFAULT_BATCH_DRAWCALLS = 256 # Default number of batch draw calls (by state changes: mode, texture)
45
- RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4 # Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
46
- RL_MAX_MATRIX_STACK_SIZE = 32 # Maximum size of internal Matrix stack
47
- RL_MAX_SHADER_LOCATIONS = 32 # Maximum number of shader locations supported
48
- RL_CULL_DISTANCE_NEAR = 0.01 # Default projection matrix near cull distance
49
- RL_CULL_DISTANCE_FAR = 1000.0 # Default projection matrix far cull distance
50
- RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION = 0
51
- RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD = 1
52
- RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL = 2
53
- RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR = 3
54
- RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT = 4
55
- RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 = 5
56
- RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES = 6
57
- RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION = "vertexPosition" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
58
- RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD = "vertexTexCoord" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD
59
- RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL = "vertexNormal" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL
60
- RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR = "vertexColor" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR
61
- RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT = "vertexTangent" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT
62
- RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 = "vertexTexCoord2" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2
63
- RL_DEFAULT_SHADER_UNIFORM_NAME_MVP = "mvp" # model-view-projection matrix
64
- RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW = "matView" # view matrix
65
- RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION = "matProjection" # projection matrix
66
- RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL = "matModel" # model matrix
67
- RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL = "matNormal" # normal matrix (transpose(inverse(matModelView))
68
- RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR = "colDiffuse" # color diffuse (base tint color, multiplied by texture color)
69
- RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 = "texture0" # texture0 (texture slot active 0)
70
- RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 = "texture1" # texture1 (texture slot active 1)
71
- RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 = "texture2" # texture2 (texture slot active 2)
72
- SUPPORT_QUADS_DRAW_MODE = 1
73
- SPLINE_SEGMENT_DIVISIONS = 24 # Spline segments subdivisions
74
- SUPPORT_FILEFORMAT_PNG = 1
75
- SUPPORT_FILEFORMAT_GIF = 1
76
- SUPPORT_FILEFORMAT_QOI = 1
77
- SUPPORT_FILEFORMAT_DDS = 1
78
- SUPPORT_IMAGE_EXPORT = 1
79
- SUPPORT_IMAGE_GENERATION = 1
80
- SUPPORT_IMAGE_MANIPULATION = 1
81
- SUPPORT_DEFAULT_FONT = 1
82
- SUPPORT_FILEFORMAT_TTF = 1
83
- SUPPORT_FILEFORMAT_FNT = 1
84
- SUPPORT_TEXT_MANIPULATION = 1
85
- SUPPORT_FONT_ATLAS_WHITE_REC = 1
86
- MAX_TEXT_BUFFER_LENGTH = 1024 # Size of internal static buffers used on some functions:
87
- MAX_TEXTSPLIT_COUNT = 128 # Maximum number of substrings to split: TextSplit()
88
- SUPPORT_FILEFORMAT_OBJ = 1
89
- SUPPORT_FILEFORMAT_MTL = 1
90
- SUPPORT_FILEFORMAT_IQM = 1
91
- SUPPORT_FILEFORMAT_GLTF = 1
92
- SUPPORT_FILEFORMAT_VOX = 1
93
- SUPPORT_FILEFORMAT_M3D = 1
94
- SUPPORT_MESH_GENERATION = 1
95
- MAX_MATERIAL_MAPS = 12 # Maximum number of shader maps supported
96
- MAX_MESH_VERTEX_BUFFERS = 7 # Maximum vertex buffers (VBO) per mesh
97
- SUPPORT_FILEFORMAT_WAV = 1
98
- SUPPORT_FILEFORMAT_OGG = 1
99
- SUPPORT_FILEFORMAT_MP3 = 1
100
- SUPPORT_FILEFORMAT_QOA = 1
101
- SUPPORT_FILEFORMAT_XM = 1
102
- SUPPORT_FILEFORMAT_MOD = 1
103
- AUDIO_DEVICE_FORMAT = "ma_format_f32" # Device output format (miniaudio: float-32bit)
104
- AUDIO_DEVICE_CHANNELS = 2 # Device output channels: stereo
105
- AUDIO_DEVICE_SAMPLE_RATE = 0 # Device sample rate (device default)
106
- MAX_AUDIO_BUFFER_POOL_CHANNELS = 16 # Maximum number of audio pool channels
107
- SUPPORT_STANDARD_FILEIO = 1
108
- SUPPORT_TRACELOG = 1
109
- MAX_TRACELOG_MSG_LENGTH = 256 # Max length of one trace-log message
110
-
111
- end
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # [NOTICE] Autogenerated. Do not edit.
6
+
7
+ require 'ffi'
8
+
9
+ module Raylib
10
+ extend FFI::Library
11
+
12
+ # Define/Macro
13
+
14
+ SUPPORT_MODULE_RSHAPES = 1
15
+ SUPPORT_MODULE_RTEXTURES = 1
16
+ SUPPORT_MODULE_RTEXT = 1 # WARNING: It requires SUPPORT_MODULE_RTEXTURES to load sprite font textures
17
+ SUPPORT_MODULE_RMODELS = 1
18
+ SUPPORT_MODULE_RAUDIO = 1
19
+ SUPPORT_CAMERA_SYSTEM = 1
20
+ SUPPORT_GESTURES_SYSTEM = 1
21
+ SUPPORT_RPRAND_GENERATOR = 1
22
+ SUPPORT_MOUSE_GESTURES = 1
23
+ SUPPORT_SSH_KEYBOARD_RPI = 1
24
+ SUPPORT_WINMM_HIGHRES_TIMER = 1
25
+ SUPPORT_PARTIALBUSY_WAIT_LOOP = 1
26
+ SUPPORT_SCREEN_CAPTURE = 1
27
+ SUPPORT_GIF_RECORDING = 1
28
+ SUPPORT_COMPRESSION_API = 1
29
+ SUPPORT_AUTOMATION_EVENTS = 1
30
+ SUPPORT_CLIPBOARD_IMAGE = 1
31
+ SUPPORT_FILEFORMAT_BMP = 1
32
+ SUPPORT_FILEFORMAT_PNG = 1
33
+ SUPPORT_FILEFORMAT_JPG = 1
34
+ MAX_FILEPATH_CAPACITY = 8192 # Maximum file paths capacity
35
+ MAX_FILEPATH_LENGTH = 4096 # Maximum length for filepaths (Linux PATH_MAX default value)
36
+ MAX_KEYBOARD_KEYS = 512 # Maximum number of keyboard keys supported
37
+ MAX_MOUSE_BUTTONS = 8 # Maximum number of mouse buttons supported
38
+ MAX_GAMEPADS = 4 # Maximum number of gamepads supported
39
+ MAX_GAMEPAD_AXIS = 8 # Maximum number of axis supported (per gamepad)
40
+ MAX_GAMEPAD_BUTTONS = 32 # Maximum number of buttons supported (per gamepad)
41
+ MAX_GAMEPAD_VIBRATION_TIME = 2.0 # Maximum vibration time in seconds
42
+ MAX_TOUCH_POINTS = 8 # Maximum number of touch points supported
43
+ MAX_KEY_PRESSED_QUEUE = 16 # Maximum number of keys in the key input queue
44
+ MAX_CHAR_PRESSED_QUEUE = 16 # Maximum number of characters in the char input queue
45
+ MAX_DECOMPRESSION_SIZE = 64 # Max size allocated for decompression in MB
46
+ MAX_AUTOMATION_EVENTS = 16384 # Maximum number of automation events to record
47
+ RL_SUPPORT_MESH_GPU_SKINNING = 1 # GPU skinning, comment if your GPU does not support more than 8 VBOs
48
+ RL_DEFAULT_BATCH_BUFFERS = 1 # Default number of batch buffers (multi-buffering)
49
+ RL_DEFAULT_BATCH_DRAWCALLS = 256 # Default number of batch draw calls (by state changes: mode, texture)
50
+ RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4 # Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
51
+ RL_MAX_MATRIX_STACK_SIZE = 32 # Maximum size of internal Matrix stack
52
+ RL_MAX_SHADER_LOCATIONS = 32 # Maximum number of shader locations supported
53
+ RL_CULL_DISTANCE_NEAR = 0.01 # Default projection matrix near cull distance
54
+ RL_CULL_DISTANCE_FAR = 1000.0 # Default projection matrix far cull distance
55
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION = 0
56
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD = 1
57
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL = 2
58
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR = 3
59
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT = 4
60
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 = 5
61
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES = 6
62
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS = 7
63
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS = 8
64
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCE_TX = 9
65
+ RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION = "vertexPosition" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
66
+ RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD = "vertexTexCoord" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD
67
+ RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL = "vertexNormal" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL
68
+ RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR = "vertexColor" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR
69
+ RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT = "vertexTangent" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT
70
+ RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 = "vertexTexCoord2" # Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2
71
+ RL_DEFAULT_SHADER_UNIFORM_NAME_MVP = "mvp" # model-view-projection matrix
72
+ RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW = "matView" # view matrix
73
+ RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION = "matProjection" # projection matrix
74
+ RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL = "matModel" # model matrix
75
+ RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL = "matNormal" # normal matrix (transpose(inverse(matModelView))
76
+ RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR = "colDiffuse" # color diffuse (base tint color, multiplied by texture color)
77
+ RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 = "texture0" # texture0 (texture slot active 0)
78
+ RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 = "texture1" # texture1 (texture slot active 1)
79
+ RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 = "texture2" # texture2 (texture slot active 2)
80
+ SUPPORT_QUADS_DRAW_MODE = 1
81
+ SPLINE_SEGMENT_DIVISIONS = 24 # Spline segments subdivisions
82
+ SUPPORT_FILEFORMAT_GIF = 1
83
+ SUPPORT_FILEFORMAT_QOI = 1
84
+ SUPPORT_FILEFORMAT_DDS = 1
85
+ SUPPORT_IMAGE_EXPORT = 1
86
+ SUPPORT_IMAGE_GENERATION = 1
87
+ SUPPORT_IMAGE_MANIPULATION = 1
88
+ SUPPORT_DEFAULT_FONT = 1
89
+ SUPPORT_FILEFORMAT_TTF = 1
90
+ SUPPORT_FILEFORMAT_FNT = 1
91
+ SUPPORT_TEXT_MANIPULATION = 1
92
+ SUPPORT_FONT_ATLAS_WHITE_REC = 1
93
+ MAX_TEXT_BUFFER_LENGTH = 1024 # Size of internal static buffers used on some functions:
94
+ MAX_TEXTSPLIT_COUNT = 128 # Maximum number of substrings to split: TextSplit()
95
+ SUPPORT_FILEFORMAT_OBJ = 1
96
+ SUPPORT_FILEFORMAT_MTL = 1
97
+ SUPPORT_FILEFORMAT_IQM = 1
98
+ SUPPORT_FILEFORMAT_GLTF = 1
99
+ SUPPORT_FILEFORMAT_VOX = 1
100
+ SUPPORT_FILEFORMAT_M3D = 1
101
+ SUPPORT_MESH_GENERATION = 1
102
+ MAX_MATERIAL_MAPS = 12 # Maximum number of shader maps supported
103
+ MAX_MESH_VERTEX_BUFFERS = 9 # Maximum vertex buffers (VBO) per mesh
104
+ SUPPORT_FILEFORMAT_WAV = 1
105
+ SUPPORT_FILEFORMAT_OGG = 1
106
+ SUPPORT_FILEFORMAT_MP3 = 1
107
+ SUPPORT_FILEFORMAT_QOA = 1
108
+ SUPPORT_FILEFORMAT_XM = 1
109
+ SUPPORT_FILEFORMAT_MOD = 1
110
+ AUDIO_DEVICE_CHANNELS = 2 # Device output channels: stereo
111
+ AUDIO_DEVICE_SAMPLE_RATE = 0 # Device sample rate (device default)
112
+ MAX_AUDIO_BUFFER_POOL_CHANNELS = 16 # Maximum number of audio pool channels
113
+ SUPPORT_STANDARD_FILEIO = 1
114
+ SUPPORT_TRACELOG = 1
115
+ MAX_TRACELOG_MSG_LENGTH = 256 # Max length of one trace-log message
116
+
117
+ end
Binary file