
4 Apr
2010
4 Apr
'10
5:03 a.m.
Hi What is the correct way to record "custom" state when using OpenGL? By this, I refer to, say, properties of a square--say it's x,y coordinates as it moves across the screen. This requires that the program keep track of the object's state as it moves. These coordinates are _not_ part of the OpenGL state machine, so is the correct way to use the State monad? If so--or if not so--how would I proceed to keep track of the state of my objects as they move about the screen? Maybe the HOpenGL implementation comes with such state-tracking devices? Please post code snippets if necessary. Thanks in advance, Mark Spezzano