Re: Re: HOpenGL on macs?

Sven Panne <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
Carlos Scheidegger wrote:
> [...] What happens is that the window seems to be created ok (at least I get
> a window entitled "APolygon"), but the contents of the window are just
> plain white. It should be to a red background, and a white polygon
> should be drawn.. [...]

I guess this is not Mac-specific at all: You don't use initialDisplayMode,
so a single buffered window will be created by default. But you are using
swapBuffers in your display callback, which is for double buffered windows.
I'm not sure what exactly happens on Mac OS X then, but it is not correct
on any platform. Two easy fixes: You can either request a double buffered
window via "initializeDisplayMode [ ..., DoubleBuffered, ... ]" (before
you create the window, of course), or you can use flush instead of swapBuffers.

Cheers,
    S.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.