I am taking a graphics class and I have a problem I have not been able to resolve. When I translate along the Z axis objects are clipped before their size changes. It almost seems likes its stuck using a ortho prjojection some how. That being said the clip plan is very close and to me does not resemble the one I set in gluPerspective. It starts to clip after being translated -0.6 units down the z axis. <div>
<br></div><div>Attached is the code that I use to setup the projection matrix.</div><div><br></div><div><div>main = do</div><div>  (progname, _) ←  getArgsAndInitialize</div><div>  --initialContextVersion 3 0</div><div>  createWindow &quot;Ben Christy Assignment 2&quot;</div>
<div>  windowSize $= Size 800 600 </div><div>  matrixMode $= Projection</div><div>  loadIdentity</div><div>  depthFunc $= Just Less</div><div>  viewport   $= (Position 0 0, Size 800 600) </div><div>  perspective 60 1.333 1 1200</div>
<div>  --tableModel ←  initModelVBO (vertexTupleListToVertexList table)</div><div>  changesRef ←  newIORef Map.empty</div><div>  sceneRef ←  newIORef buildSSG</div><div>  balloonState ←  newIORef There</div><div>  balloonZTarget ←  newIORef 4</div>
<div>  balloonZStart ←  newIORef 0</div><div>  balloonStep ←  newIORef 0</div><div>  balloonNumSteps ←  newIORef 0</div><div>  reshapeCallback $= Just reshape</div><div>  displayCallback $= (displayScene sceneRef changesRef )</div>
<div>  --addTimerCallback  10 (animate sceneRef changesRef balloonState balloonZTarget balloonZStart balloonStep balloonNumSteps)</div><div>  keyboardMouseCallback $= Just (handleInput sceneRef changesRef)</div><div>  mainLoop</div>
<div>reshape (Size w h) = do</div><div>  print &quot;resize&quot;</div><div>  matrixMode $= Projection</div><div>  loadIdentity</div><div>  depthFunc $= Just Less</div><div>  viewport   $= (Position 0 0, Size w h)</div><div>
  perspective 60 1.333 0.01 1200</div><div>  matrixMode $= Modelview 1</div><div>  loadIdentity</div><div>  postRedisplay Nothing</div></div><div> </div>