1
0
Fork 0
Commit graph

2 commits

Author SHA1 Message Date
Micah Johnston e8b1236fda
Fix warnings in examples (#180) 2024-03-27 04:46:47 +01:00
Adrien Prokopowicz 998ced845c
Added functional open_parented example (#172)
This PR adds a simple example that allows to test and showcase the `Window::open_parented` method.

That example first creates a parent window using `Window::open_blocking`, and then creates a smaller child window using `Window::open_parented`.

Both window's handlers log all of their events to the console, in a similar fashion to the `open_window` example.

Both windows actually do rendering (unlike the `open_window` example for now): the parent fills its window with a grey backround, and the child fills its window with a red background.

This example also uses the `softbuffer` crate to perform the rendering, which allows testing it in a more portable manner and in the simplest use case possible, without having to involve OpenGL or any 3D rendering pipeline at all.
2024-03-24 17:16:16 -05:00