I sort of understand what people are getting at.
My basic question is now, given that I have a bunch of parameters that
represent state should I bundle up ALL of these parameters in one data type
(DemoState, say) and have ONE IORef variable that references the lot, or have
an IORef for each
Maybe I should ask: If I have many state variables encapsulated in one IO
(StateVar DemoState) how do I go about referencing and updating _one_ without
having to enumerate all of them?
What is the syntax?
Mark
On 09/04/2010, at 12:13 AM, Mark Spezzano wrote:
I sort of understand what people
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
A state monad is really just a convenience (of the sanity-sustaining
variety), so that you don't have to name a variable for each new
modification of your state. It won't help you here with this specific
problem.
Create an IORef or MVar early in your main function, and pass it into your
On Sun, Apr 4, 2010 at 5:03 AM, Mark Spezzano
mark.spezz...@chariot.net.au wrote:
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