Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Gosu::Macro cannot be rendered as Gosu::Bitmap yet
- - By redcodefinal Date 2016-04-24 15:22
When trying to render an Image I get this error, Gosu::Macro cannot be rendered as Gosu::Bitmap yet. The next line triggers it.

      @image.save(world_path + "#{last_number}.png")

This section is where I create the image.

    @image ||= record(1, 1) do
        @time = Benchmark.realtime do
            @world.draw_world
        end
    end
    translate(@camera.x, @camera.y) do
        @image.draw(740, 190, 1, @zoom_modes[@zoom], @zoom_modes[@zoom])
    end

Is there any way I can save an image like this?
Parent - By lol_o2 Date 2016-04-24 18:23
Use Ashton. Render to Texture, convert the Texture to Image and save it.

As the error says, it's impossible with Gosu alone.
Up Topic Gosu / Gosu Exchange / Gosu::Macro cannot be rendered as Gosu::Bitmap yet

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill