-- PART I: public api which can be used to do low level hackery (much like
-- opengl)

-- we now define some actions which can be used for rendering
-- note that this setter stuff can be modelelled using lenses [for example
-- [1] which gives first class references.
-- however, for simplicity we won't do this now.

-- takes a cull mode and procues a action in RenderM which has no result
-- but an effect on the pi undefined
setCullMode :: Culling -> RenderM ()
setCullMode cullMode = modify setCull 
  where setCull (GS input r) = GS input $ r { culling = cullMode } -- nicer with lenses
setCullMode :: Culling -> RenderM ()
setCullMode cullMode = modify setCull 
  where setCull (GS input r) = GS input $ r { culling = cullMode } -- nicer with lenses
setCullMode cullMode = modify setCull 
  where setCull (GS input r) = GS input $ r { culling = cullMode } -- nicer with lenses