Simon Hausmann
3142883ca8
Render the contents of image elements
...
The source property is a path relative to the path of the executable.
That is still rather inconvenient. It would be more convenient to make
it relative to the source file, but the corresponding proc-macro span
source_file() accessor is not public/stable.
Perhaps there's a way of doing this also through the generated code and
std::file!().
2020-05-13 10:27:09 +02:00
Simon Hausmann
e144e885e1
Generalize the offset state in the rendering loop
...
Using a transform allows for additional properties such as scale and rotation
later.
2020-05-13 08:17:30 +02:00
Simon Hausmann
6ba90975b8
Further cleanup of the internal run_event_loop
...
Let the callback take a frame and that's it. Then the caller can take
care of presenting it, etc.
2020-05-12 22:16:04 +02:00
Simon Hausmann
5117452e94
Remove TODO comment fixed by previous commit
2020-05-12 22:12:11 +02:00
Simon Hausmann
c26a2a1562
Fix GL context state handling
...
Make our GL context not current when done with the initialization
and make it current for the duration fo primitive creation and frame
rendering.
Fixes #4
2020-05-12 21:42:34 +02:00
Simon Hausmann
ea03e08306
Clean up rectangle creation
...
Use a simple shared convenience method in the GraphicsBackend trait
2020-05-12 19:22:01 +02:00
Simon Hausmann
5986d5f2b8
More visitor cleanups
...
Provide a non-mutable visitor as well, as the actual rendering loop doesn't need
to change the items fortunately.
2020-05-12 16:33:50 +02:00
Simon Hausmann
f22b18584e
Remove the cells in CachedRenderingData
...
Since we have a mutable accessor to this structure, we can skip the cells and make the code easier to read.
2020-05-12 16:26:58 +02:00
Simon Hausmann
93de9cf90c
Change visit_items to take a mutable ref
...
This is safer, Olivier says :-)
2020-05-12 16:17:39 +02:00
Simon Hausmann
573a2bb0a9
Minor cleanup
...
Rename dirty_bit to cache_ok -- that makes the code slightly more readable.
2020-05-12 16:05:26 +02:00
Simon Hausmann
c5bcba2c3c
Added basic rendering of cache primitives to the Items
2020-05-12 16:00:41 +02:00
Olivier Goffart
638c445cf9
Support for rendering sub-elements with proper offset
2020-05-12 15:38:50 +02:00
Simon Hausmann
7efcbd5816
Simplify geometry handing
...
Replace the use of kurbo's primitives with lyon/euclid. This means less data copying,
conversion and also no annoying precision
casts.
2020-05-11 19:23:03 +02:00
Olivier Goffart
471dd0f778
Make run_component safe
2020-05-11 15:35:17 +02:00
Olivier Goffart
88e904d228
Draft of the layouting runtime code
2020-05-11 15:33:38 +02:00
Simon Hausmann
c966f6e546
Add primitive rectangle rendering
...
This is still uncached, but gets something onto the screen.
2020-05-11 15:33:14 +02:00
Simon Hausmann
83eb00b080
Run the C++ generated component through the GL backend
...
... which in turn forward to the corelib, but with the GL renderer attached.
2020-05-11 15:05:33 +02:00
Simon Hausmann
63d3f5125e
Move the main loop implementation into the core library
2020-05-11 14:30:41 +02:00
Olivier Goffart
bd039be10c
Introduce the datastructure to allow models and repeater
2020-05-11 10:10:25 +02:00
Olivier Goffart
9ad39d835e
move the abi in its own module
2020-05-06 10:27:09 +02:00
Olivier Goffart
35fde11515
Use cbindgen to generate the internal abi
2020-05-06 10:11:32 +02:00
Olivier Goffart
acccb33c8c
Lower and generate some C++
2020-05-05 18:31:00 +02:00
Simon Hausmann
9c961059e1
Beginnings of a simple lyon and glium based GL renderer
2020-05-04 15:27:21 +02:00
Simon Hausmann
c6553d007e
Initial commit laying out the structure
2020-05-04 10:49:58 +02:00