Re: Help with Pointers
- Posted by ghaberek (admin) 2 days ago
- 43 views
From the perspective of Euphoria/Phix, glLightfv/poke(atom_to_float32()) should handle all the cases needed, or I
suppose you could check whether params is all int and if so use glLightiv/poke4. Just don't mix f/poke4 or i/to_f32.
I am in no position to say whether iv might produce grubbier/grainier results than fv, or vice-versa.
Should the results always be indistinguishable, then iv would be a (likely-non-measurable) smidge faster.
Otherwise, of course, totally agree with everything Greg said, except the potential iv/fv mixup (as existed in the OP).
On a side note, I find myself having to write peek/poke float routines over and over again, so I'm planning to add them directly to std/machine.e. Not sure why we didn't add them with peek_pointer(), etc.
Mr Invisible here deserves a mention too...
I appreciate your contributions, Pete!
-Greg