raylib 5.0.0.5__cp312-cp312-macosx_14_0_arm64.whl → 5.5.0.2__cp312-cp312-macosx_14_0_arm64.whl

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.

Potentially problematic release.


This version of raylib might be problematic. Click here for more details.

Binary file
raylib/build.py CHANGED
@@ -25,12 +25,13 @@ import sys
25
25
  import subprocess
26
26
  import time
27
27
 
28
-
29
-
28
+ RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop")
30
29
 
31
30
  def check_raylib_installed():
32
31
  return subprocess.run(['pkg-config', '--exists', 'raylib'], text=True, stdout=subprocess.PIPE).returncode == 0
33
32
 
33
+ def check_SDL_installed():
34
+ return subprocess.run(['pkg-config', '--exists', 'sdl2'], text=True, stdout=subprocess.PIPE).returncode == 0
34
35
 
35
36
  def get_the_include_path():
36
37
  return subprocess.run(['pkg-config', '--variable=includedir', 'raylib'], text=True,
@@ -106,6 +107,9 @@ def build_unix():
106
107
  if not check_raylib_installed():
107
108
  raise Exception("ERROR: raylib not found by pkg-config. Please install pkg-config and Raylib.")
108
109
 
110
+ if RAYLIB_PLATFORM=="SDL" and not check_SDL_installed():
111
+ raise Exception("ERROR: SDL2 not found by pkg-config. Please install pkg-config and SDL2.")
112
+
109
113
  raylib_h = get_the_include_path() + "/raylib.h"
110
114
  rlgl_h = get_the_include_path() + "/rlgl.h"
111
115
  raymath_h = get_the_include_path() + "/raymath.h"
@@ -126,7 +130,7 @@ def build_unix():
126
130
  """
127
131
 
128
132
  glfw3_h = get_the_include_path() + "/GLFW/glfw3.h"
129
- if check_header_exists(glfw3_h):
133
+ if RAYLIB_PLATFORM=="Desktop" and check_header_exists(glfw3_h):
130
134
  ffi_includes += """
131
135
  #include "GLFW/glfw3.h"
132
136
  """
@@ -154,7 +158,7 @@ def build_unix():
154
158
  ffibuilder.cdef(pre_process_header(raygui_h))
155
159
  if os.path.isfile(physac_h):
156
160
  ffibuilder.cdef(pre_process_header(physac_h))
157
- if os.path.isfile(glfw3_h):
161
+ if RAYLIB_PLATFORM=="Desktop" and os.path.isfile(glfw3_h):
158
162
  ffibuilder.cdef(pre_process_header(glfw3_h))
159
163
 
160
164
 
@@ -163,15 +167,28 @@ def build_unix():
163
167
  extra_link_args = [get_the_lib_path() + '/libraylib.a', '-framework', 'OpenGL', '-framework', 'Cocoa',
164
168
  '-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework',
165
169
  'CoreVideo']
170
+ if RAYLIB_PLATFORM=="SDL":
171
+ extra_link_args += ['/usr/local/lib/libSDL2.a', '-framework', 'CoreHaptics', '-framework', 'ForceFeedback',
172
+ '-framework', 'GameController']
166
173
  libraries = []
167
174
  extra_compile_args = ["-Wno-error=incompatible-function-pointer-types", "-D_CFFI_NO_LIMITED_API"]
168
175
  else: #platform.system() == "Linux":
169
176
  print("BUILDING FOR LINUX")
170
177
  extra_link_args = get_lib_flags() + [ '-lm', '-lpthread', '-lGL',
171
- '-lrt', '-lm', '-ldl', '-lX11', '-lpthread', '-latomic']
178
+ '-lrt', '-lm', '-ldl', '-lpthread', '-latomic']
179
+ if RAYLIB_PLATFORM=="SDL":
180
+ extra_link_args += ['-lX11','-lSDL2']
181
+ elif RAYLIB_PLATFORM=="DRM":
182
+ extra_link_args += ['-lEGL', '-lgbm']
183
+ else:
184
+ extra_link_args += ['-lX11']
172
185
  extra_compile_args = ["-Wno-incompatible-pointer-types", "-D_CFFI_NO_LIMITED_API"]
173
- libraries = ['GL', 'm', 'pthread', 'dl', 'rt', 'X11', 'atomic']
186
+ libraries = [] # Not sure why but we put them in extra_link_args instead so *shouldnt* be needed here
187
+
174
188
 
189
+ print("extra_link_args: "+str(extra_link_args))
190
+ print("extra_compile_args: "+str(extra_compile_args))
191
+ print("libraries: "+str(libraries))
175
192
  ffibuilder.set_source("raylib._raylib_cffi",
176
193
  ffi_includes,
177
194
  py_limited_api=False,
@@ -184,26 +201,41 @@ def build_unix():
184
201
  def build_windows():
185
202
  print("BUILDING FOR WINDOWS")
186
203
  ffibuilder.cdef(open("raylib/raylib.h.modified").read())
187
- ffibuilder.cdef(open("raylib/glfw3.h.modified").read())
204
+ if RAYLIB_PLATFORM=="Desktop":
205
+ ffibuilder.cdef(open("raylib/glfw3.h.modified").read())
188
206
  ffibuilder.cdef(open("raylib/rlgl.h.modified").read())
189
207
  ffibuilder.cdef(open("raylib/raygui.h.modified").read())
190
208
  ffibuilder.cdef(open("raylib/physac.h.modified").read())
191
209
  ffibuilder.cdef(open("raylib/raymath.h.modified").read())
192
- ffibuilder.set_source("raylib._raylib_cffi", """
210
+
211
+ ffi_includes = """
193
212
  #include "raylib.h"
194
- #include "rlgl.h"
213
+ #include "rlgl.h"
195
214
  #include "raymath.h"
196
- #include "GLFW/glfw3.h"
215
+ """
216
+
217
+ if RAYLIB_PLATFORM=="Desktop":
218
+ ffi_includes += """
219
+ #include "GLFW/glfw3.h"
220
+ """
221
+
222
+ ffi_includes += """
197
223
  #define RAYGUI_IMPLEMENTATION
198
224
  #define RAYGUI_SUPPORT_RICONS
199
225
  #include "raygui.h"
200
226
  #define PHYSAC_IMPLEMENTATION
201
- #include "physac.h"
202
- """,
227
+ #include "physac.h"
228
+ """
229
+ libraries = ['raylib', 'gdi32', 'shell32', 'user32', 'OpenGL32', 'winmm']
230
+ if RAYLIB_PLATFORM=="SDL":
231
+ libraries += ['SDL2']
232
+
233
+ print("libraries: "+str(libraries))
234
+ ffibuilder.set_source("raylib._raylib_cffi", ffi_includes,
203
235
  extra_link_args=['/NODEFAULTLIB:MSVCRTD'],
204
- extra_compile_args="/D_CFFI_NO_LIMITED_API",
236
+ extra_compile_args=["/D_CFFI_NO_LIMITED_API"],
205
237
  py_limited_api=False,
206
- libraries=['raylib', 'gdi32', 'shell32', 'user32', 'OpenGL32', 'winmm'],
238
+ libraries=libraries,
207
239
  include_dirs=['D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raylib-c\\src',
208
240
  'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raylib-c\\src\\external\\glfw\\include',
209
241
  'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raygui\\src',
raylib/defines.py CHANGED
@@ -1,9 +1,9 @@
1
1
  import raylib
2
2
 
3
3
  RAYLIB_VERSION_MAJOR: int = 5
4
- RAYLIB_VERSION_MINOR: int = 0
4
+ RAYLIB_VERSION_MINOR: int = 5
5
5
  RAYLIB_VERSION_PATCH: int = 0
6
- RAYLIB_VERSION: str = "5.0"
6
+ RAYLIB_VERSION: str = "5.5"
7
7
  PI: float = 3.141592653589793
8
8
  DEG2RAD = PI / 180.0
9
9
  RAD2DEG = 180.0 / PI
@@ -15,7 +15,7 @@ MATERIAL_MAP_SPECULAR = raylib.MATERIAL_MAP_METALNESS
15
15
  SHADER_LOC_MAP_DIFFUSE = raylib.SHADER_LOC_MAP_ALBEDO
16
16
  SHADER_LOC_MAP_SPECULAR = raylib.SHADER_LOC_MAP_METALNESS
17
17
  EPSILON: float = 1e-06
18
- RLGL_VERSION: str = "4.5"
18
+ RLGL_VERSION: str = "5.0"
19
19
  RL_DEFAULT_BATCH_BUFFER_ELEMENTS: int = 8192
20
20
  RL_DEFAULT_BATCH_BUFFERS: int = 1
21
21
  RL_DEFAULT_BATCH_DRAWCALLS: int = 256
@@ -86,6 +86,17 @@ RL_BLEND_SRC_RGB: int = 32969
86
86
  RL_BLEND_DST_ALPHA: int = 32970
87
87
  RL_BLEND_SRC_ALPHA: int = 32971
88
88
  RL_BLEND_COLOR: int = 32773
89
+ RL_READ_FRAMEBUFFER: int = 36008
90
+ RL_DRAW_FRAMEBUFFER: int = 36009
91
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION: int = 0
92
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD: int = 1
93
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL: int = 2
94
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR: int = 3
95
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT: int = 4
96
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2: int = 5
97
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES: int = 6
98
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS: int = 7
99
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS: int = 8
89
100
  RL_SHADER_LOC_MAP_DIFFUSE = raylib.RL_SHADER_LOC_MAP_ALBEDO
90
101
  RL_SHADER_LOC_MAP_SPECULAR = raylib.RL_SHADER_LOC_MAP_METALNESS
91
102
  GL_SHADING_LANGUAGE_VERSION: int = 35724
@@ -102,6 +113,8 @@ GL_COMPRESSED_RGBA_ASTC_4x4_KHR: int = 37808
102
113
  GL_COMPRESSED_RGBA_ASTC_8x8_KHR: int = 37815
103
114
  GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: int = 34047
104
115
  GL_TEXTURE_MAX_ANISOTROPY_EXT: int = 34046
116
+ GL_PROGRAM_POINT_SIZE: int = 34370
117
+ GL_LINE_WIDTH: int = 2849
105
118
  GL_UNSIGNED_SHORT_5_6_5: int = 33635
106
119
  GL_UNSIGNED_SHORT_5_5_5_1: int = 32820
107
120
  GL_UNSIGNED_SHORT_4_4_4_4: int = 32819
@@ -113,19 +126,22 @@ RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL: str = "vertexNormal"
113
126
  RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR: str = "vertexColor"
114
127
  RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT: str = "vertexTangent"
115
128
  RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2: str = "vertexTexCoord2"
129
+ RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS: str = "vertexBoneIds"
130
+ RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS: str = "vertexBoneWeights"
116
131
  RL_DEFAULT_SHADER_UNIFORM_NAME_MVP: str = "mvp"
117
132
  RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW: str = "matView"
118
133
  RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION: str = "matProjection"
119
134
  RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL: str = "matModel"
120
135
  RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL: str = "matNormal"
121
136
  RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR: str = "colDiffuse"
137
+ RL_DEFAULT_SHADER_UNIFORM_NAME_BONE_MATRICES: str = "boneMatrices"
122
138
  RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0: str = "texture0"
123
139
  RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1: str = "texture1"
124
140
  RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2: str = "texture2"
125
141
  RAYGUI_VERSION_MAJOR: int = 4
126
- RAYGUI_VERSION_MINOR: int = 0
142
+ RAYGUI_VERSION_MINOR: int = 5
127
143
  RAYGUI_VERSION_PATCH: int = 0
128
- RAYGUI_VERSION: str = "4.0"
144
+ RAYGUI_VERSION: str = "4.5-dev"
129
145
  SCROLLBAR_LEFT_SIDE: int = 0
130
146
  SCROLLBAR_RIGHT_SIDE: int = 1
131
147
  RAYGUI_ICON_SIZE: int = 16
@@ -149,6 +165,7 @@ RAYGUI_PANEL_BORDER_WIDTH: int = 1
149
165
  RAYGUI_TABBAR_ITEM_WIDTH: int = 160
150
166
  RAYGUI_MIN_SCROLLBAR_WIDTH: int = 40
151
167
  RAYGUI_MIN_SCROLLBAR_HEIGHT: int = 40
168
+ RAYGUI_MIN_MOUSE_WHEEL_SPEED: int = 20
152
169
  RAYGUI_TOGGLEGROUP_MAX_ITEMS: int = 32
153
170
  RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN: int = 40
154
171
  RAYGUI_TEXTBOX_AUTO_CURSOR_DELAY: int = 1
@@ -423,12 +440,14 @@ GLFW_CONTEXT_RELEASE_BEHAVIOR: int = 139273
423
440
  GLFW_CONTEXT_NO_ERROR: int = 139274
424
441
  GLFW_CONTEXT_CREATION_API: int = 139275
425
442
  GLFW_SCALE_TO_MONITOR: int = 139276
443
+ GLFW_SCALE_FRAMEBUFFER: int = 139277
426
444
  GLFW_COCOA_RETINA_FRAMEBUFFER: int = 143361
427
445
  GLFW_COCOA_FRAME_NAME: int = 143362
428
446
  GLFW_COCOA_GRAPHICS_SWITCHING: int = 143363
429
447
  GLFW_X11_CLASS_NAME: int = 147457
430
448
  GLFW_X11_INSTANCE_NAME: int = 147458
431
449
  GLFW_WIN32_KEYBOARD_MENU: int = 151553
450
+ GLFW_WIN32_SHOWDEFAULT: int = 151554
432
451
  GLFW_WAYLAND_APP_ID: int = 155649
433
452
  GLFW_NO_API: int = 0
434
453
  GLFW_OPENGL_API: int = 196609
@@ -461,6 +480,8 @@ GLFW_ANGLE_PLATFORM_TYPE_D3D9: int = 225284
461
480
  GLFW_ANGLE_PLATFORM_TYPE_D3D11: int = 225285
462
481
  GLFW_ANGLE_PLATFORM_TYPE_VULKAN: int = 225287
463
482
  GLFW_ANGLE_PLATFORM_TYPE_METAL: int = 225288
483
+ GLFW_WAYLAND_PREFER_LIBDECOR: int = 229377
484
+ GLFW_WAYLAND_DISABLE_LIBDECOR: int = 229378
464
485
  GLFW_ANY_POSITION: int = 2147483648
465
486
  GLFW_ARROW_CURSOR: int = 221185
466
487
  GLFW_IBEAM_CURSOR: int = 221186
@@ -480,6 +501,7 @@ GLFW_PLATFORM: int = 327683
480
501
  GLFW_COCOA_CHDIR_RESOURCES: int = 331777
481
502
  GLFW_COCOA_MENUBAR: int = 331778
482
503
  GLFW_X11_XCB_VULKAN_SURFACE: int = 335873
504
+ GLFW_WAYLAND_LIBDECOR: int = 339969
483
505
  GLFW_ANY_PLATFORM: int = 393216
484
506
  GLFW_PLATFORM_WIN32: int = 393217
485
507
  GLFW_PLATFORM_COCOA: int = 393218
raylib/enums.py CHANGED
@@ -136,7 +136,7 @@ class KeyboardKey(IntEnum):
136
136
  KEY_KP_ENTER = 335
137
137
  KEY_KP_EQUAL = 336
138
138
  KEY_BACK = 4
139
- KEY_MENU = 82
139
+ KEY_MENU = 5
140
140
  KEY_VOLUME_UP = 24
141
141
  KEY_VOLUME_DOWN = 25
142
142
 
@@ -230,6 +230,9 @@ class ShaderLocationIndex(IntEnum):
230
230
  SHADER_LOC_MAP_IRRADIANCE = 23
231
231
  SHADER_LOC_MAP_PREFILTER = 24
232
232
  SHADER_LOC_MAP_BRDF = 25
233
+ SHADER_LOC_VERTEX_BONEIDS = 26
234
+ SHADER_LOC_VERTEX_BONEWEIGHTS = 27
235
+ SHADER_LOC_BONE_MATRICES = 28
233
236
 
234
237
  class ShaderUniformDataType(IntEnum):
235
238
  SHADER_UNIFORM_FLOAT = 0
@@ -294,7 +297,6 @@ class CubemapLayout(IntEnum):
294
297
  CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2
295
298
  CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3
296
299
  CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4
297
- CUBEMAP_LAYOUT_PANORAMA = 5
298
300
 
299
301
  class FontType(IntEnum):
300
302
  FONT_DEFAULT = 0
@@ -433,6 +435,8 @@ class GuiComboBoxProperty(IntEnum):
433
435
  class GuiDropdownBoxProperty(IntEnum):
434
436
  ARROW_PADDING = 16
435
437
  DROPDOWN_ITEMS_SPACING = 17
438
+ DROPDOWN_ARROW_HIDDEN = 18
439
+ DROPDOWN_ROLL_UP = 19
436
440
 
437
441
  class GuiTextBoxProperty(IntEnum):
438
442
  TEXT_READONLY = 16
@@ -446,6 +450,7 @@ class GuiListViewProperty(IntEnum):
446
450
  LIST_ITEMS_SPACING = 17
447
451
  SCROLLBAR_WIDTH = 18
448
452
  SCROLLBAR_SIDE = 19
453
+ LIST_ITEMS_BORDER_WIDTH = 20
449
454
 
450
455
  class GuiColorPickerProperty(IntEnum):
451
456
  COLOR_SELECTOR_SIZE = 16
@@ -675,15 +680,15 @@ class GuiIconName(IntEnum):
675
680
  ICON_FOLDER = 217
676
681
  ICON_FILE = 218
677
682
  ICON_SAND_TIMER = 219
678
- ICON_220 = 220
679
- ICON_221 = 221
680
- ICON_222 = 222
681
- ICON_223 = 223
682
- ICON_224 = 224
683
- ICON_225 = 225
684
- ICON_226 = 226
685
- ICON_227 = 227
686
- ICON_228 = 228
683
+ ICON_WARNING = 220
684
+ ICON_HELP_BOX = 221
685
+ ICON_INFO_BOX = 222
686
+ ICON_PRIORITY = 223
687
+ ICON_LAYERS_ISO = 224
688
+ ICON_LAYERS2 = 225
689
+ ICON_MLAYERS = 226
690
+ ICON_MAPS = 227
691
+ ICON_HOT = 228
687
692
  ICON_229 = 229
688
693
  ICON_230 = 230
689
694
  ICON_231 = 231