CrystGLFW::Event::WindowFramebufferResize

A CrystGLFW::Event::WindowFramebufferResize is generated when the frame buffer of a Window is resized. It is yielded to the block defined by on_framebuffer_resize.

window = Window.new

window.on_framebuffer_resize do |event|
  puts "frame buffer resized to #{event.size}"
end

window

You can retrieve the event's associated Window using the window method:

event.window # => CrystGLFW::Window

size

You can retrieve the new size of the frame buffer using the size method:

event.size # => {width: Int32, height: Int32}

results matching ""

    No results matching ""