rays 0.3.10 → 0.3.12

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.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.doc/ext/rays/image.cpp +10 -0
  3. data/.doc/ext/rays/painter.cpp +49 -1
  4. data/.doc/ext/rays/polygon.cpp +1 -1
  5. data/.doc/ext/rays/shader.cpp +8 -6
  6. data/.github/workflows/release-gem.yml +4 -1
  7. data/.github/workflows/test.yml +4 -4
  8. data/.github/workflows/utils.rb +88 -17
  9. data/ChangeLog.md +24 -0
  10. data/Gemfile.lock +6 -5
  11. data/Rakefile +3 -3
  12. data/VERSION +1 -1
  13. data/ext/rays/extconf.rb +3 -4
  14. data/ext/rays/image.cpp +11 -0
  15. data/ext/rays/painter.cpp +53 -1
  16. data/ext/rays/polygon.cpp +1 -1
  17. data/ext/rays/shader.cpp +8 -6
  18. data/include/rays/coord.h +6 -6
  19. data/include/rays/defs.h +2 -0
  20. data/include/rays/image.h +11 -1
  21. data/include/rays/painter.h +19 -0
  22. data/include/rays/ruby.h +2 -2
  23. data/include/rays/shader.h +5 -3
  24. data/include/rays.h +2 -2
  25. data/lib/rays/extension.rb +8 -2
  26. data/lib/rays/image.rb +2 -1
  27. data/lib/rays/shader.rb +13 -4
  28. data/rays.gemspec +3 -4
  29. data/src/bitmap.h +4 -0
  30. data/src/color_space.cpp +2 -42
  31. data/src/coord.h +10 -0
  32. data/src/font.cpp +1 -1
  33. data/src/image.cpp +85 -11
  34. data/src/ios/bitmap.mm +5 -32
  35. data/src/ios/rays.mm +3 -3
  36. data/src/opengl/bitmap.cpp +41 -0
  37. data/src/opengl/color_space.cpp +51 -0
  38. data/src/{color_space.h → opengl/color_space.h} +2 -2
  39. data/src/{frame_buffer.cpp → opengl/frame_buffer.cpp} +1 -1
  40. data/src/{frame_buffer.h → opengl/frame_buffer.h} +2 -2
  41. data/src/{ios → opengl/ios}/opengl.mm +3 -3
  42. data/src/{opengl.h → opengl/opengl.h} +2 -6
  43. data/src/{osx → opengl/osx}/opengl.mm +3 -3
  44. data/src/opengl/painter.cpp +1020 -0
  45. data/src/{render_buffer.cpp → opengl/render_buffer.cpp} +1 -1
  46. data/src/{render_buffer.h → opengl/render_buffer.h} +2 -2
  47. data/src/{sdl → opengl/sdl}/opengl.cpp +10 -3
  48. data/src/{shader.cpp → opengl/shader.cpp} +69 -53
  49. data/src/{shader.h → opengl/shader.h} +12 -8
  50. data/src/{shader_program.cpp → opengl/shader_program.cpp} +24 -10
  51. data/src/{shader_program.h → opengl/shader_program.h} +4 -3
  52. data/src/{shader_source.cpp → opengl/shader_source.cpp} +2 -4
  53. data/src/{shader_source.h → opengl/shader_source.h} +2 -2
  54. data/src/{texture.cpp → opengl/texture.cpp} +18 -7
  55. data/src/opengl/texture.h +21 -0
  56. data/src/{win32 → opengl/win32}/opengl.cpp +4 -3
  57. data/src/osx/bitmap.mm +6 -34
  58. data/src/osx/rays.mm +3 -3
  59. data/src/painter.cpp +96 -925
  60. data/src/painter.h +223 -11
  61. data/src/polygon.cpp +38 -13
  62. data/src/renderer.h +22 -0
  63. data/src/sdl/bitmap.cpp +5 -33
  64. data/src/sdl/font.cpp +358 -9
  65. data/src/sdl/rays.cpp +8 -3
  66. data/src/texture.h +6 -3
  67. data/src/win32/bitmap.cpp +6 -34
  68. data/src/win32/rays.cpp +3 -3
  69. data/test/test_painter.rb +36 -25
  70. data/test/test_painter_batch.rb +254 -0
  71. metadata +31 -24
  72. /data/src/{opengl.cpp → opengl/opengl.cpp} +0 -0
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_SRC_FRAME_BUFFER_H__
4
- #define __RAYS_SRC_FRAME_BUFFER_H__
3
+ #ifndef __RAYS_SRC_OPENGL_FRAME_BUFFER_H__
4
+ #define __RAYS_SRC_OPENGL_FRAME_BUFFER_H__
5
5
 
6
6
 
7
7
  #include <xot/pimpl.h>
@@ -1,5 +1,5 @@
1
1
  // -*- objc -*-
2
- #include "../opengl.h"
2
+ #include "../../renderer.h"
3
3
 
4
4
 
5
5
  #import <OpenGLES/EAGL.h>
@@ -22,13 +22,13 @@ namespace Rays
22
22
 
23
23
 
24
24
  void
25
- OpenGL_init ()
25
+ Renderer_init ()
26
26
  {
27
27
  activate_offscreen_context();
28
28
  }
29
29
 
30
30
  void
31
- OpenGL_fin ()
31
+ Renderer_fin ()
32
32
  {
33
33
  }
34
34
 
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_SRC_OPENGL_H__
4
- #define __RAYS_SRC_OPENGL_H__
3
+ #ifndef __RAYS_SRC_OPENGL_OPENGL_H__
4
+ #define __RAYS_SRC_OPENGL_OPENGL_H__
5
5
 
6
6
 
7
7
  #if defined(OSX)
@@ -21,10 +21,6 @@ namespace Rays
21
21
  {
22
22
 
23
23
 
24
- void OpenGL_init ();
25
-
26
- void OpenGL_fin ();
27
-
28
24
  bool OpenGL_has_error ();
29
25
 
30
26
  void OpenGL_check_error (const char* file, int line);
@@ -1,5 +1,5 @@
1
1
  // -*- objc -*-
2
- #include "../opengl.h"
2
+ #include "../../renderer.h"
3
3
 
4
4
 
5
5
  #import <AppKit/AppKit.h>
@@ -39,13 +39,13 @@ namespace Rays
39
39
 
40
40
 
41
41
  void
42
- OpenGL_init ()
42
+ Renderer_init ()
43
43
  {
44
44
  activate_offscreen_context();
45
45
  }
46
46
 
47
47
  void
48
- OpenGL_fin ()
48
+ Renderer_fin ()
49
49
  {
50
50
  }
51
51