
Yes, well, I agree that it might be better to render to a texture in this case. Here is a general idea of how you'd go about that:
def draw
# Draw into a buffer image, rather than directly onto the screen. THIS HAS TO OCCUR BEFORE you do regular drawing to the screen.
# the image can't be larger than 1022x1022
@buffer ||= TexPlay.create_image(...) # size of actual game area (not including mirrored bit).
@buffer.clear # Make sure there is nothing in the buffer.
$screen.render_to_texture(@buffer) do
# Draw everything into the @buffer image as you would normally do to the screen.
# What you'd normally put directly in #draw
@background.draw(...)
@sprites.each {|s| s.draw(...) }
@font.draw(...)
end
@buffer.draw(...) # draw the image one way on the screen.
@buffer.draw(...) # draw the image the other way on the screen.
end
Anyway, that is just a framework to get you started (it ONLY requires texplay). I have NO idea about the amount of lag this will cause, but it might well be a lot less than the opengl/devil route and since you always reuse a single image as the buffer, you never need to worry about running out of memory.