rays 0.1.9 → 0.1.10

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
  SHA1:
3
- metadata.gz: 7ebe243b01fc7a01ec4ff0a6cec05648f8cca592
4
- data.tar.gz: 0865209e13e9aaaf678d215df4afe9b3262d094d
3
+ metadata.gz: e230aa24b23fc3613e532f8a99f86f8e2bb8c7a1
4
+ data.tar.gz: 01c21244f0c0865cba464c9df735423c83b1bbf4
5
5
  SHA512:
6
- metadata.gz: ef1548261bc1ef3d7710f47422ea7a8f6dda287fe452f619545b4bd7cda47837ada92b090eae6dedec51d758b70628d38f1e65adc381230cfa1d463c53fa648e
7
- data.tar.gz: bae292886978f083b34fd2506960865591787ccebc3fb0c2f9bb0d6b6ef17cacdfe2219dbf84dcce5cbc585014775f06377c70009ad7930c31043f5f4f97d42b
6
+ metadata.gz: ec8c73e68609daef267718abf45481454e675797c99e405748e032c1b330706125408fd3a00079de35db730259caccfe8ad79b2fa2adca7cd2f539a517e6ce87
7
+ data.tar.gz: d7443ae673e5c62792dda760dc81e0f6bc9ddcc1110951b00acb15301e5ae1eb575442092752a0cb982c0d4d885b63c5fc0c86518e95b2750602388201df53bf
@@ -6,35 +6,45 @@ using namespace Rucy;
6
6
 
7
7
 
8
8
  void Init_rays ();
9
+
9
10
  void Init_point ();
10
11
  void Init_bounds ();
11
12
  void Init_color ();
12
13
  void Init_color_space ();
14
+
13
15
  void Init_bitmap ();
14
16
  void Init_texture ();
15
17
  void Init_image ();
16
18
  void Init_font ();
17
19
  void Init_shader ();
20
+
18
21
  void Init_painter ();
19
22
 
20
23
 
21
24
  extern "C" void
22
- Init_native ()
25
+ #ifdef COCOAPODS
26
+ Init_rays_native ()
27
+ #else
28
+ Init_native ()
29
+ #endif
23
30
  {
24
31
  RUCY_TRY
25
32
 
26
33
  Rucy::init();
27
34
 
28
35
  Init_rays();
36
+
29
37
  Init_point();
30
38
  Init_bounds();
31
39
  Init_color();
32
40
  Init_color_space();
41
+
33
42
  Init_bitmap();
34
43
  Init_texture();
35
44
  Init_image();
36
45
  Init_font();
37
46
  Init_shader();
47
+
38
48
  Init_painter();
39
49
 
40
50
  RUCY_CATCH
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
- # Rays - A Drawing Engine using OpenGL
2
+ # Rays - A Drawing Engine using OpenGL.
3
3
 
4
- ## by snori@xord.org
4
+ by snori@xord.org
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.9
1
+ 0.1.10
@@ -6,35 +6,45 @@ using namespace Rucy;
6
6
 
7
7
 
8
8
  void Init_rays ();
9
+
9
10
  void Init_point ();
10
11
  void Init_bounds ();
11
12
  void Init_color ();
12
13
  void Init_color_space ();
14
+
13
15
  void Init_bitmap ();
14
16
  void Init_texture ();
15
17
  void Init_image ();
16
18
  void Init_font ();
17
19
  void Init_shader ();
20
+
18
21
  void Init_painter ();
19
22
 
20
23
 
21
24
  extern "C" void
22
- Init_native ()
25
+ #ifdef COCOAPODS
26
+ Init_rays_native ()
27
+ #else
28
+ Init_native ()
29
+ #endif
23
30
  {
24
31
  RUCY_TRY
25
32
 
26
33
  Rucy::init();
27
34
 
28
35
  Init_rays();
36
+
29
37
  Init_point();
30
38
  Init_bounds();
31
39
  Init_color();
32
40
  Init_color_space();
41
+
33
42
  Init_bitmap();
34
43
  Init_texture();
35
44
  Init_image();
36
45
  Init_font();
37
46
  Init_shader();
47
+
38
48
  Init_painter();
39
49
 
40
50
  RUCY_CATCH
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_GL_H__
4
- #define __RAYS_GL_H__
3
+ #ifndef __RAYS_OPENGL_H__
4
+ #define __RAYS_OPENGL_H__
5
5
 
6
6
 
7
7
  #if defined(OSX)
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
 
24
24
  s.authors = %w[snori]
25
25
  s.email = 'snori@xord.org'
26
- s.homepage = "https://github.com/xord/spacy/wiki/#{name.capitalize}-Home"
26
+ s.homepage = "https://github.com/xord/rays"
27
27
 
28
28
  s.platform = Gem::Platform::RUBY
29
29
  s.required_ruby_version = '>=1.9.0'
@@ -1,7 +1,7 @@
1
1
  #include "rays/exception.h"
2
2
 
3
3
 
4
- #include "xot/string.h"
4
+ #include <xot/string.h>
5
5
 
6
6
 
7
7
  namespace Rays
@@ -49,7 +49,7 @@ namespace Rays
49
49
 
50
50
  if (id >= 0)
51
51
  {
52
- GLenum id_ = id;
52
+ GLuint id_ = id;
53
53
  glDeleteFramebuffers(1, &id_);
54
54
  check_error(__FILE__, __LINE__);
55
55
  }
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_FRAME_BUFFER_H__
4
- #define __RAYS_FRAME_BUFFER_H__
3
+ #ifndef __RAYS_SRC_FRAME_BUFFER_H__
4
+ #define __RAYS_SRC_FRAME_BUFFER_H__
5
5
 
6
6
 
7
7
  #include <xot/pimpl.h>
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_OSX_HELPER_H__
4
- #define __RAYS_OSX_HELPER_H__
3
+ #ifndef __RAYS_SRC_OSX_HELPER_H__
4
+ #define __RAYS_SRC_OSX_HELPER_H__
5
5
 
6
6
 
7
7
  #include <boost/shared_ptr.hpp>
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_OSX_HELPER_H__
4
- #define __RAYS_OSX_HELPER_H__
3
+ #ifndef __RAYS_SRC_OSX_HELPER_H__
4
+ #define __RAYS_SRC_OSX_HELPER_H__
5
5
 
6
6
 
7
7
  #include <boost/shared_ptr.hpp>
@@ -870,7 +870,7 @@ namespace Rays
870
870
  if (!tex)
871
871
  rays_error(__FILE__, __LINE__, "text_image's texture is invalid.");
872
872
 
873
- #ifdef DEBUG
873
+ #if 0//def DEBUG
874
874
  save_image(self->text_image, "/Users/snori/font.png");
875
875
 
876
876
  painter->push_attr();
@@ -1,6 +1,14 @@
1
1
  #include "program.h"
2
2
 
3
3
 
4
+ #ifndef IOS
5
+ #define USE_SHADER
6
+ #endif
7
+
8
+
9
+ #ifdef USE_SHADER
10
+
11
+
4
12
  #include <vector>
5
13
  #include <algorithm>
6
14
  #include <boost/scoped_ptr.hpp>
@@ -511,3 +519,130 @@ namespace Rays
511
519
 
512
520
 
513
521
  }// Rays
522
+
523
+
524
+ #else// USE_SHADER
525
+
526
+
527
+ #include "rays/exception.h"
528
+
529
+
530
+ namespace Rays
531
+ {
532
+
533
+
534
+ struct Program::Data {};
535
+
536
+
537
+ Program::Program ()
538
+ {
539
+ }
540
+
541
+ Program::~Program ()
542
+ {
543
+ }
544
+
545
+ void
546
+ Program::attach (const Shader& shader)
547
+ {
548
+ not_implemented_error(__FILE__, __LINE__);
549
+ }
550
+
551
+ void
552
+ Program::detach (const Shader& shader)
553
+ {
554
+ not_implemented_error(__FILE__, __LINE__);
555
+ }
556
+
557
+ void
558
+ Program::set_uniform (const char* name, int arg1)
559
+ {
560
+ not_implemented_error(__FILE__, __LINE__);
561
+ }
562
+
563
+ void
564
+ Program::set_uniform (const char* name, int arg1, int arg2)
565
+ {
566
+ not_implemented_error(__FILE__, __LINE__);
567
+ }
568
+
569
+ void
570
+ Program::set_uniform (const char* name, int arg1, int arg2, int arg3)
571
+ {
572
+ not_implemented_error(__FILE__, __LINE__);
573
+ }
574
+
575
+ void
576
+ Program::set_uniform (const char* name, int arg1, int arg2, int arg3, int arg4)
577
+ {
578
+ not_implemented_error(__FILE__, __LINE__);
579
+ }
580
+
581
+ void
582
+ Program::set_uniform (const char* name, const int* args, size_t size)
583
+ {
584
+ not_implemented_error(__FILE__, __LINE__);
585
+ }
586
+
587
+ void
588
+ Program::set_uniform (const char* name, float arg1)
589
+ {
590
+ not_implemented_error(__FILE__, __LINE__);
591
+ }
592
+
593
+ void
594
+ Program::set_uniform (const char* name, float arg1, float arg2)
595
+ {
596
+ not_implemented_error(__FILE__, __LINE__);
597
+ }
598
+
599
+ void
600
+ Program::set_uniform (const char* name, float arg1, float arg2, float arg3)
601
+ {
602
+ not_implemented_error(__FILE__, __LINE__);
603
+ }
604
+
605
+ void
606
+ Program::set_uniform (const char* name, float arg1, float arg2, float arg3, float arg4)
607
+ {
608
+ not_implemented_error(__FILE__, __LINE__);
609
+ }
610
+
611
+ void
612
+ Program::set_uniform (const char* name, const float* args, size_t size)
613
+ {
614
+ not_implemented_error(__FILE__, __LINE__);
615
+ }
616
+
617
+ void
618
+ Program::push ()
619
+ {
620
+ }
621
+
622
+ void
623
+ Program::pop ()
624
+ {
625
+ }
626
+
627
+ GLuint
628
+ Program::id () const
629
+ {
630
+ return 0;
631
+ }
632
+
633
+ Program::operator bool () const
634
+ {
635
+ return false;
636
+ }
637
+
638
+ bool
639
+ Program::operator ! () const
640
+ {
641
+ return !operator bool();
642
+ }
643
+
644
+
645
+ }// Rays
646
+
647
+
648
+ #endif// USE_SHADER
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_PROGRAM_H__
4
- #define __RAYS_PROGRAM_H__
3
+ #ifndef __RAYS_SRC_PROGRAM_H__
4
+ #define __RAYS_SRC_PROGRAM_H__
5
5
 
6
6
 
7
7
  #include <xot/pimpl.h>
@@ -59,7 +59,7 @@ namespace Rays
59
59
  {
60
60
  if (id >= 0)
61
61
  {
62
- GLenum id_ = id;
62
+ GLuint id_ = id;
63
63
  glDeleteRenderbuffers(1, &id_);
64
64
  }
65
65
 
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_RENDER_BUFFER_H__
4
- #define __RAYS_RENDER_BUFFER_H__
3
+ #ifndef __RAYS_SRC_RENDER_BUFFER_H__
4
+ #define __RAYS_SRC_RENDER_BUFFER_H__
5
5
 
6
6
 
7
7
  #include <xot/pimpl.h>
@@ -1,6 +1,14 @@
1
1
  #include "rays/shader.h"
2
2
 
3
3
 
4
+ #ifndef IOS
5
+ #define USE_SHADER
6
+ #endif
7
+
8
+
9
+ #ifdef USE_SHADER
10
+
11
+
4
12
  #include <boost/scoped_array.hpp>
5
13
  #include "rays/exception.h"
6
14
 
@@ -115,3 +123,65 @@ namespace Rays
115
123
 
116
124
 
117
125
  }// Rays
126
+
127
+
128
+ #else// USE_SHADER
129
+
130
+
131
+ #include "rays/exception.h"
132
+
133
+
134
+ namespace Rays
135
+ {
136
+
137
+
138
+ struct Shader::Data {};
139
+
140
+
141
+ Shader::Shader ()
142
+ {
143
+ }
144
+
145
+ Shader::Shader (const char* source)
146
+ {
147
+ not_implemented_error(__FILE__, __LINE__);
148
+ }
149
+
150
+ Shader::~Shader ()
151
+ {
152
+ }
153
+
154
+ GLuint
155
+ Shader::id () const
156
+ {
157
+ return 0;
158
+ }
159
+
160
+ bool
161
+ Shader::operator == (const Shader& rhs) const
162
+ {
163
+ return false;
164
+ }
165
+
166
+ bool
167
+ Shader::operator != (const Shader& rhs) const
168
+ {
169
+ return !operator==(rhs);
170
+ }
171
+
172
+ Shader::operator bool () const
173
+ {
174
+ return false;
175
+ }
176
+
177
+ bool
178
+ Shader::operator ! () const
179
+ {
180
+ return !operator bool();
181
+ }
182
+
183
+
184
+ }// Rays
185
+
186
+
187
+ #endif// USE_SHADER
@@ -35,7 +35,7 @@ namespace Rays
35
35
  {
36
36
  if (id >= 0)
37
37
  {
38
- GLenum id_ = id;
38
+ GLuint id_ = id;
39
39
  glDeleteTextures(1, &id_);
40
40
  }
41
41
 
@@ -1,7 +1,7 @@
1
1
  // -*- c++ -*-
2
2
  #pragma once
3
- #ifndef __RAYS_WIN32_GDI_H__
4
- #define __RAYS_WIN32_GDI_H__
3
+ #ifndef __RAYS_SRC_WIN32_GDI_H__
4
+ #define __RAYS_SRC_WIN32_GDI_H__
5
5
 
6
6
 
7
7
  #include <windows.h>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rays
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - snori
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-30 00:00:00.000000000 Z
11
+ date: 2015-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -160,7 +160,6 @@ files:
160
160
  - src/ios/helper.h
161
161
  - src/ios/helper.mm
162
162
  - src/ios/opengl.mm
163
- - src/ios/program.cpp
164
163
  - src/ios/rays.mm
165
164
  - src/matrix.cpp
166
165
  - src/opengl.cpp
@@ -207,7 +206,7 @@ files:
207
206
  - ".doc/ext/rays/rays.cpp"
208
207
  - ".doc/ext/rays/shader.cpp"
209
208
  - ".doc/ext/rays/texture.cpp"
210
- homepage: https://github.com/xord/spacy/wiki/Rays-Home
209
+ homepage: https://github.com/xord/rays
211
210
  licenses: []
212
211
  metadata: {}
213
212
  post_install_message:
@@ -1,122 +0,0 @@
1
- #include "program.h"
2
-
3
-
4
- #include "rays/exception.h"
5
-
6
-
7
- namespace Rays
8
- {
9
-
10
-
11
- struct Program::Data {};
12
-
13
-
14
- Program::Program ()
15
- {
16
- }
17
-
18
- Program::~Program ()
19
- {
20
- }
21
-
22
- void
23
- Program::attach (const Shader& shader)
24
- {
25
- not_implemented_error(__FILE__, __LINE__);
26
- }
27
-
28
- void
29
- Program::detach (const Shader& shader)
30
- {
31
- not_implemented_error(__FILE__, __LINE__);
32
- }
33
-
34
- void
35
- Program::set_uniform (const char* name, int arg1)
36
- {
37
- not_implemented_error(__FILE__, __LINE__);
38
- }
39
-
40
- void
41
- Program::set_uniform (const char* name, int arg1, int arg2)
42
- {
43
- not_implemented_error(__FILE__, __LINE__);
44
- }
45
-
46
- void
47
- Program::set_uniform (const char* name, int arg1, int arg2, int arg3)
48
- {
49
- not_implemented_error(__FILE__, __LINE__);
50
- }
51
-
52
- void
53
- Program::set_uniform (const char* name, int arg1, int arg2, int arg3, int arg4)
54
- {
55
- not_implemented_error(__FILE__, __LINE__);
56
- }
57
-
58
- void
59
- Program::set_uniform (const char* name, const int* args, size_t size)
60
- {
61
- not_implemented_error(__FILE__, __LINE__);
62
- }
63
-
64
- void
65
- Program::set_uniform (const char* name, float arg1)
66
- {
67
- not_implemented_error(__FILE__, __LINE__);
68
- }
69
-
70
- void
71
- Program::set_uniform (const char* name, float arg1, float arg2)
72
- {
73
- not_implemented_error(__FILE__, __LINE__);
74
- }
75
-
76
- void
77
- Program::set_uniform (const char* name, float arg1, float arg2, float arg3)
78
- {
79
- not_implemented_error(__FILE__, __LINE__);
80
- }
81
-
82
- void
83
- Program::set_uniform (const char* name, float arg1, float arg2, float arg3, float arg4)
84
- {
85
- not_implemented_error(__FILE__, __LINE__);
86
- }
87
-
88
- void
89
- Program::set_uniform (const char* name, const float* args, size_t size)
90
- {
91
- not_implemented_error(__FILE__, __LINE__);
92
- }
93
-
94
- void
95
- Program::push ()
96
- {
97
- }
98
-
99
- void
100
- Program::pop ()
101
- {
102
- }
103
-
104
- GLuint
105
- Program::id () const
106
- {
107
- return 0;
108
- }
109
-
110
- Program::operator bool () const
111
- {
112
- return false;
113
- }
114
-
115
- bool
116
- Program::operator ! () const
117
- {
118
- return !operator bool();
119
- }
120
-
121
-
122
- }// Rays