Add a simple 3D APIs demo

Ken Thomases ken at codeweavers.com
Thu Sep 1 14:27:43 CDT 2016


On Sep 1, 2016, at 11:50 AM, Matteo Bruni <matteo.mystral at gmail.com> wrote:
> 
> 2016-08-26 21:12 GMT+02:00 Ruslan Kabatsayev <b7.10110111 at gmail.com>:
>> Hello,
>> I've addressed most of the concerns, but would like to get some
>> clarifications before I continue with the rest.
>> 
>> On Mon, Aug 22, 2016 at 12:44 PM, Matteo Bruni <matteo.mystral at gmail.com> wrote:
>>> It would be better to use explicit float constants when assigning to
>>> float variables (e.g. D3DMATERIAL).
>> Do you mean that numeric constants are to never be implicitly
>> converted? Or only integral->floating-point? Or maybe only
>> double->float?
> 
> It's not a "NEVER!!11!"-level rule, but if the conversion can be
> avoided by writing the constant properly e.g. simply adding the
> appropriate suffix, then it's good practice to do that. In that
> specific case, you should write 1.0f (or whatever the actual value is)
> explicitly.

The type conversion from assigning an integer constant to a double variable happens at compile time.  Either coding style produces equivalent results.

-Ken




More information about the wine-devel mailing list