Class: Gosu::GLTexInfo
- Inherits:
-
Object
- Object
- Gosu::GLTexInfo
- Defined in:
- lib/retro_render.rb
Instance Method Summary collapse
- #bottom_left ⇒ Object
- #bottom_right ⇒ Object
- #tex_coord_2d(x, y) ⇒ Object
- #top_left ⇒ Object
- #top_right ⇒ Object
Instance Method Details
#bottom_left ⇒ Object
13 |
# File 'lib/retro_render.rb', line 13 def bottom_left; tex_coord_2d(0.0, 0.0); end |
#bottom_right ⇒ Object
14 |
# File 'lib/retro_render.rb', line 14 def bottom_right; tex_coord_2d(1.0, 0.0); end |
#tex_coord_2d(x, y) ⇒ Object
7 8 9 10 11 |
# File 'lib/retro_render.rb', line 7 def tex_coord_2d(x, y) tex_x = self.left + x * (self.right - self.left) tex_y = (self.bottom + y * (self.top - self.bottom)) glTexCoord2d(tex_x, tex_y) end |
#top_left ⇒ Object
15 |
# File 'lib/retro_render.rb', line 15 def top_left; tex_coord_2d(0.0, 1.0); end |
#top_right ⇒ Object
16 |
# File 'lib/retro_render.rb', line 16 def top_right; tex_coord_2d(1.0, 1.0); end |