[HOpenGL] Re: HOpenGL on macs?

Sven Panne Sven.Panne at aedion.de
Fri Jun 25 02:55:27 EDT 2004


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.




More information about the HOpenGL mailing list