I can't remember the link to the forum post, but here's how you do that:
First, make sure you have the ruby-opengl gem.
Then, require 'opengl' in your game file right under require 'gosu'
Then, for each image object you instantiate, add this code right after:
@image = Gosu::Image.new("cool_retro_scaled_image.bmp", false)
glBindTexture(GL_TEXTURE_2D, self.gl_tex_info.tex_name)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
I extracted this into a method by opening up the Gosu::Image class in my main game file
class Gosu:Image
def retro!
glBindTexture(GL_TEXTURE_2D, self.gl_tex_info.tex_name)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
self
end
end
so now when I have an image, I can just do this:
@image = Gosu::Image.new("cool_retro_scaled_image.bmp", false).retro!
Try it out! Whenever you @image.draw_rot and you have the scale to something bigger than 1, it will do nearest-neighbor approximation scaling (which is what you're looking for).
Quick edit: here's that other forum post on it:
http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?tid=227