[HOpenGL] divide the display in subwindows
mai99dnn@studserv.uni-leipzig.de
mai99dnn@studserv.uni-leipzig.de
Mon, 20 Jan 2003 23:00:53 +0100 (MEZ)
Hi there.
I want to divide my window into subwindows to display different
informations (like Nate Robins in his OpenGL Tutorials, if anyone knows).
So I try to work out his solution in Haskell. My Main.hs has the following
structure:
main :: ...
mainWin<-createWindow..
reshapeFunc (Just mainReshape)
displayF... mainDisplay
sub1<-createSubWindow mainWin ...
reshapeFunc (Just sub1Reshape)
...
-- here follows the interesting part
-- in the mainReshape Nate Robins call the subReshapes...
mainReshape :: ReshapeAction
...
...
setWindow sub1 --!!! no sub1-Window in there :-(
positionWindow (...)
reshapeWindow (...)
-----------------------------------------------------------------
its clear that sub1 isnt known in the mainReshape. In C you can define
global variables to solve this. Is that in Haskell possible too?
I can't give the sub1 Window directly to the mainReshape
(mainReshape :: Window -> Resh..) because when the funtion is called in
the main this sub1 isnt created yet (see above).
I hope this was a clear description of the dilemma I'm in. And I pray,
that I'm just too stupid and the solution is much more clearer to you.
Thanx a lot
Patrick