opengl-aux 1.0.0.pre2 → 1.0.0.pre3

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: b0f8a5c01bbde81f9b36967f268803c915f727ea
4
- data.tar.gz: 9267fed6e6731e2f67e15e38d74e2c52eaa41f8b
3
+ metadata.gz: bb2ce3b020c61e5621a2000c29c1a1d195a3e6f0
4
+ data.tar.gz: 1f001ce2829f4abe169d7f0160213ebe1900044d
5
5
  SHA512:
6
- metadata.gz: 966f0ad53b47446833461343718ebed34c9bfbb9078e6ba7093a03a4dc381cdb049c98115e57f2275375c5bcf5ddd66f036874e3308836194016cade9f28af03
7
- data.tar.gz: 53f3d74a17bdad91921ba477b459182e6b9744f7113b4f81ba0ca336698181ec270eccb352bd87d640cdca320de872ee79e72b20d15a6a34535a5a5b3c470ef2
6
+ metadata.gz: 347880d7737e2b6df8bd870837ffd62b607346d7fd1d30b540cbfaa8f863048bccd94f308e9eeaf969283de891baedb30b4554f1c82aa3b7d01587c4907ad11e
7
+ data.tar.gz: 0550ba7b3d633cc58a79cc21ba5180d03b53a8620c811ae135449c2d4f1fea99e9ccdbf63b7ad3b9c621c8b4362ea579f7c14a815388f8ce0e73a241b6b10744
@@ -22,7 +22,8 @@ class GL::Buffer
22
22
  end
23
23
 
24
24
  def preserve_binding(target)
25
- current = bound_name(target)
25
+ raise ArgumentError, "No block given" unless block_given?
26
+ current = current_binding(target)
26
27
  begin
27
28
  yield
28
29
  ensure
@@ -76,12 +77,13 @@ class GL::Buffer
76
77
  end
77
78
 
78
79
  def bind(target = nil)
79
- target ||= (@target || GL_ARRAY_BUFFER)
80
+ target ||= (@target || GL::GL_ARRAY_BUFFER)
80
81
  @target ||= target
81
82
  raise ArgumentError, "No target given and no previous target" unless target
82
83
 
83
84
  if block_given?
84
- preserve_binding(target) do
85
+ self.class.preserve_binding(target) do
86
+ bind target
85
87
  yield self
86
88
  end
87
89
  else
@@ -101,7 +101,7 @@ class GL::Program
101
101
 
102
102
  def use
103
103
  if block_given?
104
- preserve_binding do
104
+ self.class.preserve_binding do
105
105
  use
106
106
  yield self
107
107
  end
@@ -90,7 +90,7 @@ class GL::Texture
90
90
 
91
91
  def bind(target = nil)
92
92
  # You may think this is insane, but I assure you, it isn't.
93
- target ||= (@target || GL_TEXTURE_2D)
93
+ target ||= (@target || GL::GL_TEXTURE_2D)
94
94
  @target ||= target
95
95
  raise ArgumentError, "No target given and no previous target" unless target
96
96
 
@@ -8,5 +8,5 @@
8
8
 
9
9
 
10
10
  module GL
11
- OPENGL_AUX_VERSION = '1.0.0.pre2'
11
+ OPENGL_AUX_VERSION = '1.0.0.pre3'
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opengl-aux
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre2
4
+ version: 1.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noel Raymond Cower
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2014-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opengl-core