def clear(options = {})
      options = {
          color: [0.0, 0.0, 0.0, 0.0],
      }.merge! options

      color = options[:color]
      color = color.to_opengl if color.is_a? Gosu::Color

      Gl.glBindFramebufferEXT Gl::GL_FRAMEBUFFER_EXT, fbo_id unless rendering?

      Gl.glDisable Gl::GL_BLEND # Need to replace the alpha too.
      Gl.glClearColor(*color)
      Gl.glClear Gl::GL_COLOR_BUFFER_BIT | Gl::GL_DEPTH_BUFFER_BIT
      Gl.glEnable Gl::GL_BLEND

      Gl.glBindFramebufferEXT Gl::GL_FRAMEBUFFER_EXT, 0 unless rendering?

      nil
    end
def clear(options = {})
      options = {
          color: [0.0, 0.0, 0.0, 0.0],
      }.merge! options

      color = options[:color]
      color = color.to_opengl if color.is_a? Gosu::Color

      Gl.glBindFramebufferEXT Gl::GL_FRAMEBUFFER_EXT, fbo_id unless rendering?

      Gl.glDisable Gl::GL_BLEND # Need to replace the alpha too.
      Gl.glClearColor(*color)
      Gl.glClear Gl::GL_COLOR_BUFFER_BIT | Gl::GL_DEPTH_BUFFER_BIT
      Gl.glEnable Gl::GL_BLEND

      Gl.glBindFramebufferEXT Gl::GL_FRAMEBUFFER_EXT, 0 unless rendering?

      nil
    end
Clears the buffer, optionally to a specific color.

 @option options :color [Gosu::Color, Array<Float>] (transparent)