Class: Gosu::GLTexInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/retro_render.rb

Instance Method Summary collapse

Instance Method Details

#bottom_leftObject



13
# File 'lib/retro_render.rb', line 13

def bottom_left;	tex_coord_2d(0.0, 0.0);	end

#bottom_rightObject



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_leftObject



15
# File 'lib/retro_render.rb', line 15

def top_left;	tex_coord_2d(0.0, 1.0);	end

#top_rightObject



16
# File 'lib/retro_render.rb', line 16

def top_right;	tex_coord_2d(1.0, 1.0);	end