Ben Cragg
159df28dcc
Reverted changes on setlen
2019-04-24 10:32:35 +01:00
Ben Cragg
d48ef44bdc
Added TriangleData benchmarks and improvements
2019-04-24 10:11:20 +01:00
faiface
2e38a287de
fix mutating *image.RGBA when converting PictureDataFromImage
2018-03-29 16:18:37 +02:00
Seebs
1586e600a0
The initializer is surprisingly expensive.
...
Removing the call to Alpha(1) and replacing it with an inline definition
produces measurable improvements. Replacing each instance of ZV with
Vec{} further improves things. We keep an inline RGBA because there
are circumstances (mostly when using pictures) where we don't want to
have to set colors to get default behavior.
For a fairly triangle-heavy thing, this reduces time spent in SetLen
from something over 10% of execution time to around 2.5% of execution
time.
2017-06-07 21:25:54 -05:00
faiface
fcfeb200b6
replace complex128 Vec with a struct
2017-05-21 19:25:06 +02:00
faiface
cfa9180bb7
fix PictureDataFromImage (wrong bounds when Min not (0, 0))
2017-05-09 01:04:04 +02:00
faiface
ca86b961f2
fix compiler error (ouch)
2017-04-26 15:11:12 +02:00
faiface
4cff721955
remove PictureData.SetColor
...
was confusing since Pictures in e.g. Sprites are not really updatable
2017-04-26 15:04:46 +02:00
faiface
3e65588e00
adopt RGB and Alpha
2017-04-10 17:25:56 +02:00
faiface
f4916a4272
replace NRGBA to RGBA because Porter-Duff (!!!)
2017-04-09 22:00:26 +02:00
faiface
0b3cfac547
remove Slice and Original from Picture interface
2017-03-30 23:34:07 +02:00
faiface
379b4df667
adopt new ToNRGBA function
2017-03-23 23:07:49 +01:00
faiface
118bd03bac
rename PictureData.Offset -> Index
2017-03-20 23:13:18 +01:00
faiface
b4adc875d8
make PictureData.Offset exported
2017-03-20 23:08:36 +01:00
faiface
bf5ff044b2
significantly lower memory usage of PictureData
2017-03-19 20:20:07 +01:00
faiface
6df99cdb35
fix many bugs in doc
2017-03-15 19:40:39 +01:00
faiface
203adc914b
change Rect to have Min, Max instead of Pos, Size
2017-03-13 23:52:34 +01:00
faiface
a1e7f9bf04
better error messages %T -> (%T)
2017-03-08 23:51:53 +01:00
faiface
1083ca720d
add Picture.Original
2017-03-06 19:04:57 +01:00
faiface
146797bad5
fix PictureData.Color (off by 1)
2017-03-06 13:05:45 +01:00
faiface
c91d49dadf
return pointers from constructors of Triangles/PictureData
2017-03-06 00:44:16 +01:00
faiface
e9d6e33b8a
change PictureData receiver to pointer
2017-03-05 23:16:22 +01:00
faiface
3aa7e6e8bf
change TrianglesPicture to retun intensity instead of ok
2017-03-05 12:17:07 +01:00
faiface
c1c1bae358
change TrianglesPicture to return (pic Vec, ok bool)
2017-03-05 11:47:09 +01:00
faiface
767a5a8b13
fix newly introduced bug in PictureDataFromImage
2017-03-01 12:36:53 +01:00
faiface
b1311c29b6
fix bug in PictureDataFromImage
2017-03-01 12:34:30 +01:00
faiface
0644103ba1
add clarifying comment
2017-02-28 18:36:43 +01:00
faiface
1f91ae62d2
fix bug in PictureDataFromPicture
2017-02-28 18:34:02 +01:00
faiface
3e81c81f79
remove debug prints
2017-02-28 18:29:30 +01:00
faiface
d598e68c03
implement and document PictureData
2017-02-28 18:24:25 +01:00