raylib-bindings 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16f6c02edd559680aa4dc99e3693aaf247d0cc311d3e73d49af483f3872a3d66
4
- data.tar.gz: b8965f6163bf0dc1f73230a273b82c15f08bb92a6ccf1a5be0b79bb08ccb5ca1
3
+ metadata.gz: f801d4f0a20a4702fb6698134db67f5002ba086ae73aef375088111d03e8cd58
4
+ data.tar.gz: 4e52e3a189187a289e261f8de4962434f3dc0b33cc893f570f3e117b8c531c3d
5
5
  SHA512:
6
- metadata.gz: 7b15046d7f1c6aa15ed8e25bc274ff9db0b74dc69298791d381ee995d6c3e85ac644941a2d49707ddee97edc3130735b90f84b3ced7c321d63cd5815ac545772
7
- data.tar.gz: 8524177c2fdef1a17955462ea1d289904470bc12aa0b89f0b8e8b661e2375ca5fc429ec0fb64f173b00d69db04dd7b24a2306bc7e065324823df723bcd39d546
6
+ metadata.gz: 021af639614dd70a10363d4a7bf547acca390761dfad1d0b9dcb398b34481f656c5c8b93ced34bb75395db9736d4151ba88d5355443b2bba16fdb63b17827261
7
+ data.tar.gz: 0475aa5a98ff0936459bb970aa50a68c7cf5e29071ba3c748af5e7485da9b8468e898797422391f4b58a8406b93186c8110059d77a854e8151510ecba655a95d
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 2024-10-14 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/59417636ca956d64800e7e26d4f4ec331cf1b412 ) and raygui ( https://github.com/raysan5/raygui/commit/1e03efca48c50c5ea4b4a053d5bf04bad58d3e43 )
4
+
1
5
  2024-09-16 vaiorabbit <http://twitter.com/vaiorabbit>
2
6
 
3
7
  * Updated with latest raylib ( https://github.com/raysan5/raylib/commit/186787e31179eec8280a429fae50b65ef58368d3 ) and raygui ( https://github.com/raysan5/raygui/commit/b5a81fb76eec3521f4cbd6c02ace0dcc7b1cc810 )
data/README.md CHANGED
@@ -3,15 +3,15 @@
3
3
  # Yet another raylib wrapper for Ruby #
4
4
 
5
5
  * Created : 2021-10-17
6
- * Last modified : 2024-09-16
6
+ * Last modified : 2024-10-14
7
7
 
8
8
  Provides Ruby bindings for raylib-related libraries including:
9
9
 
10
- * [raylib](https://github.com/raysan5/raylib) version [5.5-dev]( https://github.com/raysan5/raylib/commit/186787e31179eec8280a429fae50b65ef58368d3 )
10
+ * [raylib](https://github.com/raysan5/raylib) version [5.5-dev]( https://github.com/raysan5/raylib/commit/59417636ca956d64800e7e26d4f4ec331cf1b412 )
11
11
  * raylib
12
12
  * raymath
13
13
  * rlgl
14
- * [raygui](https://github.com/raysan5/raygui) version [4.5-dev]( https://github.com/raysan5/raygui/commit/b5a81fb76eec3521f4cbd6c02ace0dcc7b1cc810 )
14
+ * [raygui](https://github.com/raysan5/raygui) version [4.5-dev]( https://github.com/raysan5/raygui/commit/1e03efca48c50c5ea4b4a053d5bf04bad58d3e43 )
15
15
  * [Physac](https://github.com/raysan5/physac) version [1.1]( https://github.com/raysan5/physac/commit/4a8e17f263fb8e1150b3fbafc96f880c7d7a4833 )
16
16
 
17
17
  <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/bitmap_font_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/game_of_life_simple_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/lissajous_curve_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/procedural_texture_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/reversi_board_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/utf8_font_rb.png" width="125">
Binary file
Binary file
data/lib/libraylib.dll CHANGED
Binary file
Binary file
Binary file
data/lib/physac.dll CHANGED
Binary file
data/lib/physac.x86_64.so CHANGED
Binary file
Binary file
Binary file
data/lib/raygui.dll CHANGED
Binary file
Binary file
data/lib/raygui.x86_64.so CHANGED
Binary file
data/lib/raylib_main.rb CHANGED
@@ -231,32 +231,35 @@ module Raylib
231
231
 
232
232
  # enum ShaderLocationIndex
233
233
  # Shader location index
234
- SHADER_LOC_VERTEX_POSITION = 0 # Shader location: vertex attribute: position
235
- SHADER_LOC_VERTEX_TEXCOORD01 = 1 # Shader location: vertex attribute: texcoord01
236
- SHADER_LOC_VERTEX_TEXCOORD02 = 2 # Shader location: vertex attribute: texcoord02
237
- SHADER_LOC_VERTEX_NORMAL = 3 # Shader location: vertex attribute: normal
238
- SHADER_LOC_VERTEX_TANGENT = 4 # Shader location: vertex attribute: tangent
239
- SHADER_LOC_VERTEX_COLOR = 5 # Shader location: vertex attribute: color
240
- SHADER_LOC_MATRIX_MVP = 6 # Shader location: matrix uniform: model-view-projection
241
- SHADER_LOC_MATRIX_VIEW = 7 # Shader location: matrix uniform: view (camera transform)
242
- SHADER_LOC_MATRIX_PROJECTION = 8 # Shader location: matrix uniform: projection
243
- SHADER_LOC_MATRIX_MODEL = 9 # Shader location: matrix uniform: model (transform)
244
- SHADER_LOC_MATRIX_NORMAL = 10 # Shader location: matrix uniform: normal
245
- SHADER_LOC_VECTOR_VIEW = 11 # Shader location: vector uniform: view
246
- SHADER_LOC_COLOR_DIFFUSE = 12 # Shader location: vector uniform: diffuse color
247
- SHADER_LOC_COLOR_SPECULAR = 13 # Shader location: vector uniform: specular color
248
- SHADER_LOC_COLOR_AMBIENT = 14 # Shader location: vector uniform: ambient color
249
- SHADER_LOC_MAP_ALBEDO = 15 # Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
250
- SHADER_LOC_MAP_METALNESS = 16 # Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
251
- SHADER_LOC_MAP_NORMAL = 17 # Shader location: sampler2d texture: normal
252
- SHADER_LOC_MAP_ROUGHNESS = 18 # Shader location: sampler2d texture: roughness
253
- SHADER_LOC_MAP_OCCLUSION = 19 # Shader location: sampler2d texture: occlusion
254
- SHADER_LOC_MAP_EMISSION = 20 # Shader location: sampler2d texture: emission
255
- SHADER_LOC_MAP_HEIGHT = 21 # Shader location: sampler2d texture: height
256
- SHADER_LOC_MAP_CUBEMAP = 22 # Shader location: samplerCube texture: cubemap
257
- SHADER_LOC_MAP_IRRADIANCE = 23 # Shader location: samplerCube texture: irradiance
258
- SHADER_LOC_MAP_PREFILTER = 24 # Shader location: samplerCube texture: prefilter
259
- SHADER_LOC_MAP_BRDF = 25 # Shader location: sampler2d texture: brdf
234
+ SHADER_LOC_VERTEX_POSITION = 0 # Shader location: vertex attribute: position
235
+ SHADER_LOC_VERTEX_TEXCOORD01 = 1 # Shader location: vertex attribute: texcoord01
236
+ SHADER_LOC_VERTEX_TEXCOORD02 = 2 # Shader location: vertex attribute: texcoord02
237
+ SHADER_LOC_VERTEX_NORMAL = 3 # Shader location: vertex attribute: normal
238
+ SHADER_LOC_VERTEX_TANGENT = 4 # Shader location: vertex attribute: tangent
239
+ SHADER_LOC_VERTEX_COLOR = 5 # Shader location: vertex attribute: color
240
+ SHADER_LOC_MATRIX_MVP = 6 # Shader location: matrix uniform: model-view-projection
241
+ SHADER_LOC_MATRIX_VIEW = 7 # Shader location: matrix uniform: view (camera transform)
242
+ SHADER_LOC_MATRIX_PROJECTION = 8 # Shader location: matrix uniform: projection
243
+ SHADER_LOC_MATRIX_MODEL = 9 # Shader location: matrix uniform: model (transform)
244
+ SHADER_LOC_MATRIX_NORMAL = 10 # Shader location: matrix uniform: normal
245
+ SHADER_LOC_VECTOR_VIEW = 11 # Shader location: vector uniform: view
246
+ SHADER_LOC_COLOR_DIFFUSE = 12 # Shader location: vector uniform: diffuse color
247
+ SHADER_LOC_COLOR_SPECULAR = 13 # Shader location: vector uniform: specular color
248
+ SHADER_LOC_COLOR_AMBIENT = 14 # Shader location: vector uniform: ambient color
249
+ SHADER_LOC_MAP_ALBEDO = 15 # Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
250
+ SHADER_LOC_MAP_METALNESS = 16 # Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
251
+ SHADER_LOC_MAP_NORMAL = 17 # Shader location: sampler2d texture: normal
252
+ SHADER_LOC_MAP_ROUGHNESS = 18 # Shader location: sampler2d texture: roughness
253
+ SHADER_LOC_MAP_OCCLUSION = 19 # Shader location: sampler2d texture: occlusion
254
+ SHADER_LOC_MAP_EMISSION = 20 # Shader location: sampler2d texture: emission
255
+ SHADER_LOC_MAP_HEIGHT = 21 # Shader location: sampler2d texture: height
256
+ SHADER_LOC_MAP_CUBEMAP = 22 # Shader location: samplerCube texture: cubemap
257
+ SHADER_LOC_MAP_IRRADIANCE = 23 # Shader location: samplerCube texture: irradiance
258
+ SHADER_LOC_MAP_PREFILTER = 24 # Shader location: samplerCube texture: prefilter
259
+ SHADER_LOC_MAP_BRDF = 25 # Shader location: sampler2d texture: brdf
260
+ SHADER_LOC_VERTEX_BONEIDS = 26 # Shader location: vertex attribute: boneIds
261
+ SHADER_LOC_VERTEX_BONEWEIGHTS = 27 # Shader location: vertex attribute: boneWeights
262
+ SHADER_LOC_BONE_MATRICES = 28 # Shader location: array of matrices uniform: boneMatrices
260
263
 
261
264
  # enum ShaderUniformDataType
262
265
  # Shader uniform data type
@@ -403,7 +406,7 @@ module Raylib
403
406
  typedef :int, :CameraMode
404
407
  typedef :int, :CameraProjection
405
408
  typedef :int, :NPatchLayout
406
- callback :TraceLogCallback, [:int, :pointer, :int], :void
409
+ callback :TraceLogCallback, [:int, :pointer, :pointer], :void
407
410
  callback :LoadFileDataCallback, [:pointer, :pointer], :pointer
408
411
  callback :SaveFileDataCallback, [:pointer, :pointer, :int], :bool
409
412
  callback :LoadFileTextCallback, [:pointer], :pointer
@@ -735,8 +738,10 @@ module Raylib
735
738
  :indices, :pointer, # Vertex indices (in case vertex data comes indexed)
736
739
  :animVertices, :pointer, # Animated vertex positions (after bones transformations)
737
740
  :animNormals, :pointer, # Animated normals (after bones transformations)
738
- :boneIds, :pointer, # Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)
739
- :boneWeights, :pointer, # Vertex bone weight, up to 4 bones influence by vertex (skinning)
741
+ :boneIds, :pointer, # Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)
742
+ :boneWeights, :pointer, # Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)
743
+ :boneMatrices, :pointer, # Bones animated transformation matrices
744
+ :boneCount, :int, # Number of bones
740
745
  :vaoId, :uint, # OpenGL Vertex Array Object id
741
746
  :vboId, :pointer, # OpenGL Vertex Buffer Objects id (default vertex data)
742
747
  )
@@ -766,6 +771,10 @@ module Raylib
766
771
  def boneIds=(v) self[:boneIds] = v end
767
772
  def boneWeights = self[:boneWeights]
768
773
  def boneWeights=(v) self[:boneWeights] = v end
774
+ def boneMatrices = self[:boneMatrices]
775
+ def boneMatrices=(v) self[:boneMatrices] = v end
776
+ def boneCount = self[:boneCount]
777
+ def boneCount=(v) self[:boneCount] = v end
769
778
  def vaoId = self[:vaoId]
770
779
  def vaoId=(v) self[:vaoId] = v end
771
780
  def vboId = self[:vboId]
@@ -1923,6 +1932,12 @@ module Raylib
1923
1932
  # @return [const char *]
1924
1933
  [:GetApplicationDirectory, :GetApplicationDirectory, [], :pointer],
1925
1934
 
1935
+ # @!method MakeDirectory(dirPath)
1936
+ # MakeDirectory : Create directories (including full path requested), returns 0 on success
1937
+ # @param dirPath [const char *]
1938
+ # @return [int]
1939
+ [:MakeDirectory, :MakeDirectory, [:pointer], :int],
1940
+
1926
1941
  # @!method ChangeDirectory(dir)
1927
1942
  # ChangeDirectory : Change working directory, return true on success
1928
1943
  # @param dir [const char *]
@@ -1948,7 +1963,7 @@ module Raylib
1948
1963
  [:LoadDirectoryFiles, :LoadDirectoryFiles, [:pointer], FilePathList.by_value],
1949
1964
 
1950
1965
  # @!method LoadDirectoryFilesEx(basePath, filter, scanSubdirs)
1951
- # LoadDirectoryFilesEx : Load directory filepaths with extension filtering and recursive directory scan. Use "/DIR" in the filter string to include directories in the result
1966
+ # LoadDirectoryFilesEx : Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
1952
1967
  # @param basePath [const char *]
1953
1968
  # @param filter [const char *]
1954
1969
  # @param scanSubdirs [bool]
@@ -2363,7 +2378,7 @@ module Raylib
2363
2378
  [:GetShapesTextureRectangle, :GetShapesTextureRectangle, [], Rectangle.by_value],
2364
2379
 
2365
2380
  # @!method DrawPixel(posX, posY, color)
2366
- # DrawPixel : Draw a pixel
2381
+ # DrawPixel : Draw a pixel using geometry [Can be slow, use with care]
2367
2382
  # @param posX [int]
2368
2383
  # @param posY [int]
2369
2384
  # @param color [Color]
@@ -2371,7 +2386,7 @@ module Raylib
2371
2386
  [:DrawPixel, :DrawPixel, [:int, :int, Color.by_value], :void],
2372
2387
 
2373
2388
  # @!method DrawPixelV(position, color)
2374
- # DrawPixelV : Draw a pixel (Vector version)
2389
+ # DrawPixelV : Draw a pixel using geometry (Vector version) [Can be slow, use with care]
2375
2390
  # @param position [Vector2]
2376
2391
  # @param color [Color]
2377
2392
  # @return [void]
@@ -2959,14 +2974,6 @@ module Raylib
2959
2974
  # @return [Image]
2960
2975
  [:LoadImageRaw, :LoadImageRaw, [:pointer, :int, :int, :int, :int], Image.by_value],
2961
2976
 
2962
- # @!method LoadImageSvg(fileNameOrString, width, height)
2963
- # LoadImageSvg : Load image from SVG file data or string with specified size
2964
- # @param fileNameOrString [const char *]
2965
- # @param width [int]
2966
- # @param height [int]
2967
- # @return [Image]
2968
- [:LoadImageSvg, :LoadImageSvg, [:pointer, :int, :int], Image.by_value],
2969
-
2970
2977
  # @!method LoadImageAnim(fileName, frames)
2971
2978
  # LoadImageAnim : Load image sequence from file (frames appended to image.data)
2972
2979
  # @param fileName [const char *]
@@ -4783,6 +4790,14 @@ module Raylib
4783
4790
  # @return [bool]
4784
4791
  [:IsModelAnimationValid, :IsModelAnimationValid, [Model.by_value, ModelAnimation.by_value], :bool],
4785
4792
 
4793
+ # @!method UpdateModelAnimationBoneMatrices(model, anim, frame)
4794
+ # UpdateModelAnimationBoneMatrices : Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)
4795
+ # @param model [Model]
4796
+ # @param anim [ModelAnimation]
4797
+ # @param frame [int]
4798
+ # @return [void]
4799
+ [:UpdateModelAnimationBoneMatrices, :UpdateModelAnimationBoneMatrices, [Model.by_value, ModelAnimation.by_value, :int], :void],
4800
+
4786
4801
  # @!method CheckCollisionSpheres(center1, radius1, center2, radius2)
4787
4802
  # CheckCollisionSpheres : Check collision between two spheres
4788
4803
  # @param center1 [Vector3]
data/lib/rlgl.rb CHANGED
@@ -79,6 +79,7 @@ module Raylib
79
79
  RL_BLEND_COLOR = 0x8005 # GL_BLEND_COLOR
80
80
  RL_READ_FRAMEBUFFER = 0x8CA8 # GL_READ_FRAMEBUFFER
81
81
  RL_DRAW_FRAMEBUFFER = 0x8CA9 # GL_DRAW_FRAMEBUFFER
82
+ RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES = 6
82
83
 
83
84
  # Enum
84
85
 
@@ -1192,6 +1193,14 @@ module Raylib
1192
1193
  # @return [void]
1193
1194
  [:rlSetUniformMatrix, :rlSetUniformMatrix, [:int, Matrix.by_value], :void],
1194
1195
 
1196
+ # @!method rlSetUniformMatrices(locIndex, mat, count)
1197
+ # rlSetUniformMatrices : Set shader value matrices
1198
+ # @param locIndex [int]
1199
+ # @param mat [const Matrix *]
1200
+ # @param count [int]
1201
+ # @return [void]
1202
+ [:rlSetUniformMatrices, :rlSetUniformMatrices, [:int, :pointer, :int], :void],
1203
+
1195
1204
  # @!method rlSetUniformSampler(locIndex, textureId)
1196
1205
  # rlSetUniformSampler : Set shader value sampler
1197
1206
  # @param locIndex [int]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raylib-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-16 00:00:00.000000000 Z
11
+ date: 2024-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi