Fix camera casts

it is natural to write viewport resolutions in pixels; however, viewport
calculations are done in float coordinates. This fixes, for example,
the CoolDemo
Merge pull request #643 from manuel-freire/fix-camera-casts

Fix camera casts