Simon Hausmann
1791469390
Allow the item visitor to mutate items
2020-05-12 15:45:14 +02:00
Simon Hausmann
85e2ac36ef
Prepare for caching rendering info for Items
...
Replace the RenderTree with a RenderingCache that is just the free-list vector
of rendering primitives.
2020-05-12 15:44:08 +02:00
Olivier Goffart
638c445cf9
Support for rendering sub-elements with proper offset
2020-05-12 15:38:50 +02:00
Olivier Goffart
6e794bec18
Have a small Expression AST
2020-05-12 14:54:32 +02:00
Simon Hausmann
743ad34099
Renaming RenderNode to CachedRenderingData
...
The name node suggests some kind of connected (tree) data structure, which
isn't quite what it is. It really is meant just
to be a way of storing cached rendering data for this item.
2020-05-12 13:55:57 +02:00
Olivier Goffart
7c2f40da90
Generator for the rust API
2020-05-12 11:43:29 +02:00
Olivier Goffart
3936272384
Move the build_array_helper in the generator module
2020-05-12 09:47:54 +02:00
Olivier Goffart
89f6e3529c
Revert one of the previous change
...
The goal was to ensure that the libraries are up-to-date
2020-05-12 08:29:53 +02:00
Olivier Goffart
8bcd4b1115
CI: build with all features
2020-05-12 08:23:51 +02:00
Olivier Goffart
dbada7977e
Fix C++ build
2020-05-12 08:03:18 +02:00
Olivier Goffart
b9cd725f78
Allow to use proc_macro tokens
...
And report errors
2020-05-11 22:24:28 +02:00
Olivier Goffart
dc33cbbcda
Dummy structure for the rust example
2020-05-11 20:39:16 +02:00
Olivier Goffart
f3deea066b
Make the C++ output a feature
2020-05-11 20:21:12 +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
802c8d1add
Reformat public header with Qt's clang-format
2020-05-11 15:20:17 +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
5b4966f652
Re-format public C++ header with clang-format
2020-05-11 14:53:25 +02:00
Simon Hausmann
63d3f5125e
Move the main loop implementation into the core library
2020-05-11 14:30:41 +02:00
Simon Hausmann
3a954e4cea
Move window system creation and other GL related code into the GL backend
2020-05-11 13:11:55 +02:00
Simon Hausmann
fbc9505425
Don't require web-sys when not targeting wasm
...
Not that this caused any harm, but it's pointless.
2020-05-11 11:56:10 +02:00
Simon Hausmann
fb6267649b
Fix the event loop usage to only redraw when requested
...
This avoids spinning the CPU.
2020-05-11 11:53:51 +02:00
Simon Hausmann
4556d24eb4
Prospective fix for more effective cargo caching on GH actions
2020-05-11 11:26:32 +02:00
Olivier Goffart
6cf327166e
Parser: add support for parentheses in expressions
2020-05-11 11:19:57 +02:00
Simon Hausmann
d24437055d
Prospective build fix for GH actions build
...
Make sure to call cargo from within the source tree
2020-05-11 11:02:43 +02:00
Simon Hausmann
5b313af9aa
Use winit also when targeting wasm
...
This allows unifying the code paths more.
2020-05-11 10:56:33 +02:00
Simon Hausmann
9be4c88b13
Fix wasm build
...
Make sure that glow selects the web-sys feature when targeting wasm.
2020-05-11 10:56:33 +02:00
Simon Hausmann
932ac8e2a7
Avoid the use of glutin in the event loop itself
...
Replace the re-exports with winit types.
2020-05-11 10:56:33 +02:00
Simon Hausmann
e4ce0bcd7e
Prepare for exposing the rendering backend to C
...
... by building a cdylib.
2020-05-11 10:56:33 +02:00
Simon Hausmann
4a90c08bd4
Minor cleanup
...
Replace winit re-exports from glutin with a direct winit dependency.
This is done to prepare for moving the code into the core library that may depend on winit but not glutin.
2020-05-11 10:56:33 +02:00
Simon Hausmann
5a3ad60ad4
Ignore more generated files
...
... including the cmake build directory
2020-05-11 10:56:33 +02:00
Simon Hausmann
5953b10e1c
Ensure the runtime library is up-to-date before linking the binary
2020-05-11 10:56:33 +02:00
Olivier Goffart
1673f12652
Implement for loop in the parser
...
Not yet implemented in the object tree
2020-05-11 10:46:42 +02:00
Olivier Goffart
bd039be10c
Introduce the datastructure to allow models and repeater
2020-05-11 10:10:25 +02:00
Olivier Goffart
cc170d1d76
More comments
2020-05-11 09:00:21 +02:00
Simon Hausmann
27aca08392
Ignore some generated files
...
* What's in generated/ is ... generated.
* .cargo/config may contain local changes - we don't need to track
that for now.
2020-05-11 08:59:39 +02:00
Simon Hausmann
35831c57c7
Use glow without glutin
...
We don't need the dependency for glow
2020-05-09 14:29:07 +02:00
Simon Hausmann
8843f655eb
Reduce the binary size
...
Only use the png loader from image
2020-05-07 21:02:46 +02:00
Simon Hausmann
50b7b753e8
Minor GL renderer cleanups
...
Rename GLVertexBuffer to GLArrayBuffer, as that's what it is. Also added TODO
issue reference.
2020-05-07 20:50:01 +02:00
Simon Hausmann
f55c4e50f0
Track the issue of keeping the GL context current
2020-05-07 20:42:28 +02:00
Simon Hausmann
3d1df6178e
Track the issue of releaseing GL resources
2020-05-07 20:38:10 +02:00
Simon Hausmann
dd7d2c6dda
Fix build on macOS
...
* Enable C++17 by default (we could do with less also... but the
compiler does not default to C++11 at least)
* Replace the .so shared library extension with the cmake variable
that handles different platforms
2020-05-07 15:18:10 +02:00
Simon Hausmann
c67b688a9e
Add README that explains how to try the wasm build
2020-05-07 15:07:29 +02:00
Simon Hausmann
9d3fb8a1a1
Enable the WASM build in the CI
2020-05-07 15:07:29 +02:00
Simon Hausmann
cf37242952
Implement image rendering with glow
2020-05-07 15:07:29 +02:00
Simon Hausmann
14f807ac21
Implement path filling with glow
2020-05-07 15:07:29 +02:00
Simon Hausmann
12626472c4
Fix wasm build
...
Get rid of the glutin dependency in the GL renderer -- the caller is now responsible for swapping buffers.
2020-05-07 15:07:29 +02:00
Simon Hausmann
e0b024d2cf
Some work towards implementing the gl renderer
...
... in plain GL(ow). swapbuffers and clearing the color buffer is working.
2020-05-07 15:07:29 +02:00