
i've installed ghc-6.3.20031102 (still the "-lGL" <--> "-lGLU" bug in package.conf). that version works now, thanks. now i want to use ghci, especially with forkIO mainLoop , but that does not seem to work anymore. is that a forkIO bug? the renaming of DoubleBuffered and WithDepthBuffer is convenient. :) - marc Am Freitag, 31. Oktober 2003 18:48 schrieb Sven Panne:
Marc A. Ziegert wrote:
does anyone else have this problem? i want to use double buffering, but swapBuffers does not seem to work.
Works for me with the current version from CVS on x86 Linux, see below.
to set the active window to... the active window (i think that has to work!) does not work, too. [...]
I guess with "active" you mean "current", but this works for me, too. Remember that you can't access currentWindow (or windowPosition, windowSize, etc.) before mainLoop is entered, this is how GLUT works.
Cheers, S.
---------------------------------------------------------------------- import Graphics.UI.GLUT
dc :: DisplayCallback dc = do clearColor $= Color4 0 0 1 0 clear [ColorBuffer, DepthBuffer] putStrLn "begin swapBuffers" swapBuffers putStrLn "end swapBuffers"
main :: IO () main = do getArgsAndInitialize initialDisplayMode $= [DoubleBuffered, WithDepthBuffer] b <- get displayModePossible putStrLn $ "displayModePossible? ..." ++ show b createWindow "main" displayCallback $= dc mainLoop ---------------------------------------------------------------------- panne@jeanluc:~> ghc --make first.hs Chasing modules from: first.hs Compiling Main ( first.hs, first.o ) Linking ... panne@jeanluc:~> ./a.out displayModePossible? ...True begin swapBuffers end swapBuffers [ blue window appears, iconized it and de-iconized it again ] begin swapBuffers end swapBuffers
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl