Timm Bäder
12378f0afa
gl renderer: Expand matrix metadata extraction
...
Instead of getting the translation x/y everytime we use the modelview,
get it once, when extracting the metadata. Do the same with the scale.
And save if the matrix is "simple" at all, i.e. if it only consists of a
translation and/or scale. This will be helpful later when we start
drawing transformed nodes on textures.
2018-11-29 08:23:42 +01:00
Timm Bäder
ef751bc809
gl renderer: Use stack to keep track of modelview matrix
...
So we can avoid calculating metadata for matrices all the time.
2018-11-27 05:39:27 +01:00
Timm Bäder
5936d7f8f2
gl renderer: Properly retrieve matrix scale
...
So rotating offscreen nodes works.
2018-11-08 05:13:50 +01:00
Timm Bäder
d15df65a9d
gl renderer: Save some matrix multiplications
...
We do this for every single node, which is a little costly, especially
since the common case for the modelview matrix these days is a simple
translation. So, check whether the new modelview matrix is only a
translation matrix and if so, don't do a full matrix multiplication per
node.
2018-10-11 12:27:56 +02:00
Timm Bäder
fdfdada362
gl renderer: Increase GArray size by 2 up front
...
Since we know we will add two elements anyway.
2018-04-14 11:47:02 +02:00
Timm Bäder
5e81761ad0
gl renderer: Slightly change ops_offset behavior
...
Add the given delta to the current one instead of replacing it.
2018-04-11 19:14:54 +02:00
Timm Bäder
d7af16c8e4
gl renderer: Render everyhing according to MV scale
...
And not the surface's scale factor. This way the magnifier works.
2018-04-11 15:31:22 +02:00
Timm Bäder
cc0a69e101
gl renderer: Fix some crashes
...
When the first op is a modelview or projection change.
2018-03-27 18:20:52 +02:00
Timm Bäder
ba52be36c2
gl renderer: Set border program outline state
2018-03-15 18:17:57 +01:00
Timm Bäder
0a7880110e
gl renderer: Fix clipped borders
...
Stop abusing the clip rect for borders.
2018-03-15 18:11:57 +01:00
Timm Bäder
7a2d30323e
gl renderer: try doing outset box shadows
...
Still fall back in cases we can't handle that way.
2017-12-21 19:12:33 +01:00
Timm Bäder
f044b01549
gl renderer: Don't crash if the first op is an opacity one
2017-12-21 19:12:32 +01:00
Timm Bäder
075e6ac266
gl renderer: Fix shadow nodes if the child is a container
2017-12-21 19:12:32 +01:00
Timm Bäder
ab53ee7377
gl renderer: Don't render opacity nodes offscreen
...
We already drag a u_alpha uniform around in every shader, so use that
one.
2017-12-21 19:12:32 +01:00
Timm Bäder
7cc868910b
gl renderer: Avoid crashing tooltips
2017-12-21 19:12:31 +01:00
Timm Bäder
c9af94f6db
gl renderer: Keep track of border program state
2017-12-21 19:12:31 +01:00
Timm Bäder
5cdd46e38e
gl renderer: Remove superfluous modelview matrix changes
2017-12-21 19:12:31 +01:00
Timm Bäder
9479bb6bfc
gl renderer: Keep track of color matrix op state
2017-12-21 19:12:31 +01:00
Timm Bäder
b33d85b594
gl renderer: Avoid consecutive opacity ops
2017-12-21 19:12:31 +01:00
Timm Bäder
7dc6a46cff
gl renderer: Remove consecutive clip ops
2017-12-21 19:12:31 +01:00
Timm Bäder
5c7838e168
gl renderer: Rework program creation
...
Make sure all uniform names have to match between the shader names and
the _location integers we save in every Program struct.
2017-12-21 19:12:31 +01:00
Timm Bäder
19700fccb2
gl renderer: Keep track of current program color value
2017-12-21 19:12:31 +01:00
Timm Bäder
cb9c4e362c
gl render ops: Rename a member
2017-12-21 19:12:31 +01:00
Timm Bäder
95051e13c3
gl ops: Remove dead code
...
This is already checked further up in that function
2017-12-21 19:12:30 +01:00
Timm Bäder
832920c6ba
gl renderer: Optimize text drawing
...
Text nodes will almost always end up using the exact same texture and
the same program. So, in that case we can simply add vertex data for all
the characters we need to draw and use just one draw call.
2017-12-21 19:12:30 +01:00
Timm Bäder
a1d3e77347
gl renderer: Move render ops into separate file
2017-12-21 19:12:30 +01:00