Simon Hausmann
f29aa0a302
GL buffer handling cleanup
...
Move the buffer handling code into a separate file.
2020-05-20 10:50:49 +02:00
Simon Hausmann
4834de04f9
Shader code cleanup
...
Move the shader code into a separate file
2020-05-20 10:50:49 +02:00
Olivier Goffart
bf64e40476
Format
2020-05-20 09:34:14 +02:00
Olivier Goffart
6b3765857a
Add a TouchArea builtin item (currently does nothing)
2020-05-20 09:32:01 +02:00
Simon Hausmann
f27a715b30
GL texture handling cleanup
...
Move the gl texture handling code into a separate file/module.
2020-05-20 08:52:20 +02:00
Simon Hausmann
527525f733
Another issue created for tracking
2020-05-19 22:16:08 +02:00
Simon Hausmann
d7b742d082
Created issue for comment
2020-05-19 22:14:27 +02:00
Simon Hausmann
3f813808f1
Small comment fix
2020-05-19 22:13:11 +02:00
Simon Hausmann
81b5f70718
Implement colored text rendering
2020-05-19 21:58:01 +02:00
Simon Hausmann
ddf137221a
Implement glyph rendering using atlas texturing
...
This means duplicate glyphs are rendered only once and we store glyphs
in the atlas texture globally instead of a texture per text primitive.
2020-05-19 21:47:47 +02:00
Simon Hausmann
3c2ad7b275
Add support for atlas textures in the GL renderer
...
... and place images in there by default. This improves locality.
The atlasing is also needed for individual glyph rendering, which is
coming soon.
2020-05-19 20:38:28 +02:00
Simon Hausmann
cbd28bf745
Simplify image primitives API
...
Removed the source rectangle as that can also be done on the source image side,
if necessary.
2020-05-19 20:37:36 +02:00
Olivier Goffart
260f17a3e0
Support for inline components within a .60 file
2020-05-19 17:43:56 +02:00
Simon Hausmann
f9cafcdbea
Disable the WASM build
...
... until I get around fixing it properly with regards to text support.
2020-05-19 16:35:19 +02:00
Olivier Goffart
ab28828351
Support for img!("foo.png") to make string absolute
...
This is a temporary solution until we get better ressource handling
2020-05-19 16:30:48 +02:00
Olivier Goffart
a4569ddca3
BangExpression allow for finding relative paths
2020-05-19 15:36:56 +02:00
Olivier Goffart
f4bfc3a5b4
Use the property system for our components
2020-05-19 15:15:23 +02:00
Olivier Goffart
8ec6fd5237
Change the representation of the Property to be more FFI friendly
2020-05-19 15:09:45 +02:00
Olivier Goffart
cdeb3a4312
Import of a basic property system
2020-05-19 12:47:52 +02:00
Simon Hausmann
23d3964a0d
Add boilerplate for text items
...
Forward the text and color properties to the rendering backend, where
right now we just rendering all the glyphs into a dedicated texture.
Next steps are a glyph atlas texture, blending the specified color with
the alpha of the glyphs, configurable size and family, shaping with
Harfbuzz and may more things.
2020-05-18 19:04:12 +02:00
Olivier Goffart
b78f708786
Add SharedString::push_str
2020-05-18 18:45:33 +02:00
Olivier Goffart
ed842b3ae6
String: add comparison and simple test
2020-05-18 18:03:47 +02:00
Olivier Goffart
25bf149e13
Add a shared string that can be used in properties
2020-05-18 17:09:40 +02:00
Simon Hausmann
e6be2c91b8
Fix translation of children of images
...
Propagate the x/y of images also to the children.
2020-05-18 16:01:53 +02:00
Simon Hausmann
a7d5bd9f59
Minor rendering cleanup
...
Remove the x/y parameters from the rectangle primitive. They're always zero
since we always render with a transformation
matrix.
2020-05-18 16:01:53 +02:00
Olivier Goffart
f4714f2f5b
Add missing file
2020-05-18 16:00:18 +02:00
Olivier Goffart
68cea2aeec
Fix soundness hole in FieldOffset
...
This was cause by the change to allow to create FieldOffset in const constext
because a Fn(T)->U is not allowed in a const constext.
But we need to be contravariant in T.
2020-05-18 11:06:44 +02:00
Olivier Goffart
07942da4bb
vtable: introduce VOffset
2020-05-18 11:06:44 +02:00
Olivier Goffart
1addcad615
vtable: Fix the repr
2020-05-18 11:06:44 +02:00
Olivier Goffart
5a9cbaae66
vtable add support for field offset in the vtable
2020-05-18 11:06:44 +02:00
Olivier Goffart
751a3fbe59
Work on const field offset crate to give type safe offsets
2020-05-18 11:06:44 +02:00
Olivier Goffart
aff3d7e14b
vtable: add safe way to construct references
2020-05-18 11:06:44 +02:00
Olivier Goffart
810a3905a7
Add VBox::new
2020-05-18 11:06:44 +02:00
Olivier Goffart
b745c616f7
Add a trait to get the vtable for a type
2020-05-18 11:06:44 +02:00
Olivier Goffart
4ca45ca4da
vtable crate: Some refactoring and simplifications
2020-05-18 11:06:44 +02:00
Olivier Goffart
903fc513de
vtable: make sure one cannot call the function with the wrong type
2020-05-18 11:06:44 +02:00
Olivier Goffart
0a973f65d5
vtable: Some more safety fix
2020-05-18 11:06:44 +02:00
Olivier Goffart
f74cfe73cd
Use the vtable crate for the ItemVTable
2020-05-18 11:06:44 +02:00
Olivier Goffart
49fc23224e
vtable: Remove the TraitType wrapper, and allow Option<fn>
2020-05-18 11:06:44 +02:00
Olivier Goffart
8d9a64d249
vtable: add a macro to create a static vtable
2020-05-18 11:06:44 +02:00
Olivier Goffart
62010be72e
vtable: support associated consts
2020-05-18 11:06:44 +02:00
Olivier Goffart
544cb1a198
Fix C++ compilation using the vtable crate
2020-05-18 11:06:42 +02:00
Olivier Goffart
4988fcb543
More fix to use vtable for component. All rust code compiles
2020-05-18 11:06:31 +02:00
Olivier Goffart
686f4c9591
More work on the vtable macro to adapt the Component
...
This does not work yet
2020-05-18 11:04:54 +02:00
Olivier Goffart
1ced4224b5
More work on the vtable crate
2020-05-18 11:04:54 +02:00
Olivier Goffart
aa27fceb8c
vtable: move the macro in its own macro crate so we can have a runtime
2020-05-18 11:04:54 +02:00
Olivier Goffart
fb691e0808
Implement Component using vtable
...
(the C++ part not yet ported)
2020-05-18 11:04:54 +02:00
Olivier Goffart
4b19818f6c
WIP: port Component to vtable
2020-05-18 11:04:54 +02:00
Simon Hausmann
25fd60c820
Fix runtime panic in cpp example
...
Correct the path to the image.
2020-05-14 08:43:00 +02:00
Olivier Goffart
5c5df6b8e3
Macro to generate trait and safe abstraction for a vtable
2020-05-13 23:07:59 +02:00