Toast Engine
Loading...
Searching...
No Matches
event::WindowResize Struct Reference

Event sent when the window framebuffer is resized. More...

#include <window_events.hpp>

Inheritance diagram for event::WindowResize:
Collaboration diagram for event::WindowResize:

Public Member Functions

 WindowResize (int width, int height)

Public Attributes

int width
int height
Public Attributes inherited from event::Event< WindowResize >
friend T

Additional Inherited Members

Public Types inherited from event::Event< WindowResize >
using callback_t
 callbacks that return 'true' are consumed and do not propogate
using iterator_t

Detailed Description

Event sent when the window framebuffer is resized.

Use this on the renderer to get when the window is resized, something along these lines:

m_listener.Subscribe<WindowResize>([](WindowResize* e)->bool {
glViewport(0, 0, e->width, e->height);
});

The documentation for this struct was generated from the following file: