[HOpenGL] clear [ColorBuffer]

Jamin A. Ohmoto-Frederick jamin1001 at yahoo.com
Mon Feb 19 05:55:03 EST 2007


Looks like you need to flush the graphics commands.


try this:

// displayCallback $= clear [ ColorBuffer ]
displayCallback $= display

display = do
  clear [ ColorBuffer ]
  flush


Did that work?



Jamin


--- "h." <h._h._h._ at hotmail.com> wrote:

> Hello,
> 
> The program:
> 
> import Graphics.Rendering.OpenGL
> import Graphics.UI.GLUT
> 
> main = do
>   _ <- getArgsAndInitialize
>   createWindow "Hello World"
>   displayCallback $= clear [ ColorBuffer ]
>   mainLoop
> 
> and the problem:
> The ColorBuffer is not cleared, the window shows
> what was there before it was 
> created.
> Creating windows, drawing points,... works all well,
> but "clear [ 
> ColorBuffer ]" seems not to work.
> (I'm using the ghc 6.6 on Windows)
> 
> Thanks in advance for your help.
> 
> 
> _______________________________________________
> HOpenGL mailing list
> HOpenGL at haskell.org
> http://www.haskell.org/mailman/listinfo/hopengl
> 



 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front


More information about the HOpenGL mailing list