raylib-bindings 0.5.3 → 0.5.5

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/lib/raylib.rb CHANGED
@@ -9,9 +9,10 @@ require_relative 'config'
9
9
  require_relative 'raymath'
10
10
  require_relative 'rcamera'
11
11
  require_relative 'rlgl'
12
- require_relative 'raygui'
12
+ require_relative 'raygui_main'
13
13
  require_relative 'physac'
14
14
  require_relative 'raylib_helper'
15
+ require_relative 'raygui_helper'
15
16
 
16
17
  module Raylib
17
18
  extend FFI::Library
data/lib/raylib_main.rb CHANGED
@@ -1215,7 +1215,7 @@ module Raylib
1215
1215
  [:SetWindowPosition, :SetWindowPosition, [:int, :int], :void],
1216
1216
 
1217
1217
  # @!method SetWindowMonitor(monitor)
1218
- # SetWindowMonitor : Set monitor for the current window (fullscreen mode)
1218
+ # SetWindowMonitor : Set monitor for the current window
1219
1219
  # @param monitor [int]
1220
1220
  # @return [void]
1221
1221
  [:SetWindowMonitor, :SetWindowMonitor, [:int], :void],
@@ -1240,6 +1240,11 @@ module Raylib
1240
1240
  # @return [void]
1241
1241
  [:SetWindowOpacity, :SetWindowOpacity, [:float], :void],
1242
1242
 
1243
+ # @!method SetWindowFocused()
1244
+ # SetWindowFocused : Set window focused (only PLATFORM_DESKTOP)
1245
+ # @return [void]
1246
+ [:SetWindowFocused, :SetWindowFocused, [], :void],
1247
+
1243
1248
  # @!method GetWindowHandle()
1244
1249
  # GetWindowHandle : Get native window handle
1245
1250
  # @return [void *]
@@ -1322,7 +1327,7 @@ module Raylib
1322
1327
  [:GetWindowScaleDPI, :GetWindowScaleDPI, [], Vector2.by_value],
1323
1328
 
1324
1329
  # @!method GetMonitorName(monitor)
1325
- # GetMonitorName : Get the human-readable, UTF-8 encoded name of the primary monitor
1330
+ # GetMonitorName : Get the human-readable, UTF-8 encoded name of the specified monitor
1326
1331
  # @param monitor [int]
1327
1332
  # @return [const char *]
1328
1333
  [:GetMonitorName, :GetMonitorName, [:int], :pointer],
@@ -2709,6 +2714,14 @@ module Raylib
2709
2714
  # @return [bool]
2710
2715
  [:ExportImage, :ExportImage, [Image.by_value, :pointer], :bool],
2711
2716
 
2717
+ # @!method ExportImageToMemory(image, fileType, fileSize)
2718
+ # ExportImageToMemory : Export image to memory buffer
2719
+ # @param image [Image]
2720
+ # @param fileType [const char *]
2721
+ # @param fileSize [int *]
2722
+ # @return [unsigned char *]
2723
+ [:ExportImageToMemory, :ExportImageToMemory, [Image.by_value, :pointer, :pointer], :pointer],
2724
+
2712
2725
  # @!method ExportImageAsCode(image, fileName)
2713
2726
  # ExportImageAsCode : Export image as code file defining an array of bytes, returns true on success
2714
2727
  # @param image [Image]
@@ -2724,33 +2737,35 @@ module Raylib
2724
2737
  # @return [Image]
2725
2738
  [:GenImageColor, :GenImageColor, [:int, :int, Color.by_value], Image.by_value],
2726
2739
 
2727
- # @!method GenImageGradientV(width, height, top, bottom)
2728
- # GenImageGradientV : Generate image: vertical gradient
2740
+ # @!method GenImageGradientLinear(width, height, direction, start, end)
2741
+ # GenImageGradientLinear : Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
2729
2742
  # @param width [int]
2730
2743
  # @param height [int]
2731
- # @param top [Color]
2732
- # @param bottom [Color]
2744
+ # @param direction [int]
2745
+ # @param start [Color]
2746
+ # @param end [Color]
2733
2747
  # @return [Image]
2734
- [:GenImageGradientV, :GenImageGradientV, [:int, :int, Color.by_value, Color.by_value], Image.by_value],
2748
+ [:GenImageGradientLinear, :GenImageGradientLinear, [:int, :int, :int, Color.by_value, Color.by_value], Image.by_value],
2735
2749
 
2736
- # @!method GenImageGradientH(width, height, left, right)
2737
- # GenImageGradientH : Generate image: horizontal gradient
2750
+ # @!method GenImageGradientRadial(width, height, density, inner, outer)
2751
+ # GenImageGradientRadial : Generate image: radial gradient
2738
2752
  # @param width [int]
2739
2753
  # @param height [int]
2740
- # @param left [Color]
2741
- # @param right [Color]
2754
+ # @param density [float]
2755
+ # @param inner [Color]
2756
+ # @param outer [Color]
2742
2757
  # @return [Image]
2743
- [:GenImageGradientH, :GenImageGradientH, [:int, :int, Color.by_value, Color.by_value], Image.by_value],
2758
+ [:GenImageGradientRadial, :GenImageGradientRadial, [:int, :int, :float, Color.by_value, Color.by_value], Image.by_value],
2744
2759
 
2745
- # @!method GenImageGradientRadial(width, height, density, inner, outer)
2746
- # GenImageGradientRadial : Generate image: radial gradient
2760
+ # @!method GenImageGradientSquare(width, height, density, inner, outer)
2761
+ # GenImageGradientSquare : Generate image: square gradient
2747
2762
  # @param width [int]
2748
2763
  # @param height [int]
2749
2764
  # @param density [float]
2750
2765
  # @param inner [Color]
2751
2766
  # @param outer [Color]
2752
2767
  # @return [Image]
2753
- [:GenImageGradientRadial, :GenImageGradientRadial, [:int, :int, :float, Color.by_value, Color.by_value], Image.by_value],
2768
+ [:GenImageGradientSquare, :GenImageGradientSquare, [:int, :int, :float, Color.by_value, Color.by_value], Image.by_value],
2754
2769
 
2755
2770
  # @!method GenImageChecked(width, height, checksX, checksY, col1, col2)
2756
2771
  # GenImageChecked : Generate image: checked
@@ -2939,6 +2954,13 @@ module Raylib
2939
2954
  # @return [void]
2940
2955
  [:ImageFlipHorizontal, :ImageFlipHorizontal, [:pointer], :void],
2941
2956
 
2957
+ # @!method ImageRotate(image, degrees)
2958
+ # ImageRotate : Rotate image by input angle in degrees (-359 to 359)
2959
+ # @param image [Image *]
2960
+ # @param degrees [int]
2961
+ # @return [void]
2962
+ [:ImageRotate, :ImageRotate, [:pointer, :int], :void],
2963
+
2942
2964
  # @!method ImageRotateCW(image)
2943
2965
  # ImageRotateCW : Rotate image clockwise 90deg
2944
2966
  # @param image [Image *]
@@ -3582,6 +3604,12 @@ module Raylib
3582
3604
  # @return [void]
3583
3605
  [:DrawTextCodepoints, :DrawTextCodepoints, [Font.by_value, :pointer, :int, Vector2.by_value, :float, :float, Color.by_value], :void],
3584
3606
 
3607
+ # @!method SetTextLineSpacing(spacing)
3608
+ # SetTextLineSpacing : Set vertical line spacing when drawing with line-breaks
3609
+ # @param spacing [int]
3610
+ # @return [void]
3611
+ [:SetTextLineSpacing, :SetTextLineSpacing, [:int], :void],
3612
+
3585
3613
  # @!method MeasureText(text, fontSize)
3586
3614
  # MeasureText : Measure string width for default font
3587
3615
  # @param text [const char *]
@@ -4759,7 +4787,7 @@ module Raylib
4759
4787
  [:SetAudioStreamCallback, :SetAudioStreamCallback, [AudioStream.by_value, :AudioCallback], :void],
4760
4788
 
4761
4789
  # @!method AttachAudioStreamProcessor(stream, processor)
4762
- # AttachAudioStreamProcessor : Attach audio stream processor to stream
4790
+ # AttachAudioStreamProcessor : Attach audio stream processor to stream, receives the samples as <float>s
4763
4791
  # @param stream [AudioStream]
4764
4792
  # @param processor [AudioCallback]
4765
4793
  # @return [void]
@@ -4773,7 +4801,7 @@ module Raylib
4773
4801
  [:DetachAudioStreamProcessor, :DetachAudioStreamProcessor, [AudioStream.by_value, :AudioCallback], :void],
4774
4802
 
4775
4803
  # @!method AttachAudioMixedProcessor(processor)
4776
- # AttachAudioMixedProcessor : Attach audio stream processor to the entire audio pipeline
4804
+ # AttachAudioMixedProcessor : Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
4777
4805
  # @param processor [AudioCallback]
4778
4806
  # @return [void]
4779
4807
  [:AttachAudioMixedProcessor, :AttachAudioMixedProcessor, [:AudioCallback], :void],
data/lib/raymath.rb CHANGED
@@ -630,23 +630,23 @@ module Raylib
630
630
  # @return [Matrix]
631
631
  [:MatrixFrustum, :MatrixFrustum, [:double, :double, :double, :double, :double, :double], Matrix.by_value],
632
632
 
633
- # @!method MatrixPerspective(fovy, aspect, near, far)
633
+ # @!method MatrixPerspective(fovY, aspect, nearPlane, farPlane)
634
634
  # MatrixPerspective
635
- # @param fovy [double]
635
+ # @param fovY [double]
636
636
  # @param aspect [double]
637
- # @param near [double]
638
- # @param far [double]
637
+ # @param nearPlane [double]
638
+ # @param farPlane [double]
639
639
  # @return [Matrix]
640
640
  [:MatrixPerspective, :MatrixPerspective, [:double, :double, :double, :double], Matrix.by_value],
641
641
 
642
- # @!method MatrixOrtho(left, right, bottom, top, near, far)
642
+ # @!method MatrixOrtho(left, right, bottom, top, nearPlane, farPlane)
643
643
  # MatrixOrtho
644
644
  # @param left [double]
645
645
  # @param right [double]
646
646
  # @param bottom [double]
647
647
  # @param top [double]
648
- # @param near [double]
649
- # @param far [double]
648
+ # @param nearPlane [double]
649
+ # @param farPlane [double]
650
650
  # @return [Matrix]
651
651
  [:MatrixOrtho, :MatrixOrtho, [:double, :double, :double, :double, :double, :double], Matrix.by_value],
652
652
 
data/lib/rcamera.rb CHANGED
@@ -99,14 +99,14 @@ module Raylib
99
99
  # GetCameraViewMatrix
100
100
  # @param camera [Camera *]
101
101
  # @return [Matrix]
102
- [:GetCameraViewMatrix, :GetCameraViewMatrix, [:pointer], :int],
102
+ [:GetCameraViewMatrix, :GetCameraViewMatrix, [:pointer], Matrix.by_value],
103
103
 
104
104
  # @!method GetCameraProjectionMatrix(camera, aspect)
105
105
  # GetCameraProjectionMatrix
106
106
  # @param camera [Camera*]
107
107
  # @param aspect [float]
108
108
  # @return [Matrix]
109
- [:GetCameraProjectionMatrix, :GetCameraProjectionMatrix, [:pointer, :float], :int],
109
+ [:GetCameraProjectionMatrix, :GetCameraProjectionMatrix, [:pointer, :float], Matrix.by_value],
110
110
  ]
111
111
  entries.each do |entry|
112
112
  attach_function entry[0], entry[1], entry[2], entry[3]
data/lib/rlgl.rb CHANGED
@@ -87,6 +87,7 @@ module Raylib
87
87
  RL_OPENGL_33 = 3 # OpenGL 3.3 (GLSL 330)
88
88
  RL_OPENGL_43 = 4 # OpenGL 4.3 (using GLSL 330)
89
89
  RL_OPENGL_ES_20 = 5 # OpenGL ES 2.0 (GLSL 100)
90
+ RL_OPENGL_ES_30 = 6 # OpenGL ES 3.0 (GLSL 300 es)
90
91
 
91
92
  # enum rlTraceLogLevel
92
93
  # Trace log level
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.5.3
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-14 00:00:00.000000000 Z
11
+ date: 2023-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -66,6 +66,8 @@ files:
66
66
  - lib/raygui.dylib
67
67
  - lib/raygui.rb
68
68
  - lib/raygui.x86_64.so
69
+ - lib/raygui_helper.rb
70
+ - lib/raygui_main.rb
69
71
  - lib/raylib.rb
70
72
  - lib/raylib_helper.rb
71
73
  - lib/raylib_main.rb
@@ -91,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
93
  - !ruby/object:Gem::Version
92
94
  version: '0'
93
95
  requirements: []
94
- rubygems_version: 3.4.6
96
+ rubygems_version: 3.4.14
95
97
  signing_key:
96
98
  specification_version: 4
97
99
  summary: Provides latest raylib API for Ruby