[Rev 02] RFR: 8217472: Add attenuation for PointLight

Nir Lisker nlisker at openjdk.java.net
Fri Jan 3 23:22:56 UTC 2020


On Fri, 3 Jan 2020 22:23:29 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> I was wondering about it myself, but all the other values are `double`s that are cast to `float`s. Wouldn't it also be odd to have the API properties `DoubleProperty` and the peer to use `float`s? Isn't it just a matter of where the cast happens?
> 
> Yes, it's just a matter of where the cast happens. While we aren't entirely consistent, I think you'll find more places where the peers hold floats rather than double (one notable exception is transforms where we need the extra precision). In particular, Color and position values for shapes are stored in the peer as floats. Also, PhongMaterial stores the power as a float even though the API is double.

Alright, I don't mind it, I'll cast in the peer level.

-------------

PR: https://git.openjdk.java.net/jfx/pull/43


More information about the openjfx-dev mailing list