[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] SDL egg: SDL_GL_SwapBuffers() not implemented?
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] SDL egg: SDL_GL_SwapBuffers() not implemented? |
Date: |
Thu, 19 Feb 2009 10:37:27 +0100 |
On Mon, Feb 16, 2009 at 12:51 AM, Koen Weddepohl <address@hidden> wrote:
>
> The functions sdl-gl-set-attribute and sdl-gl-get-attribute are recognized,
> but when I call sdl-gl-get-attribute it doesn't seem to return the value
> I've set with sdl-set-attribute. I'm not sure if I'm doing something wrong,
> I haven't used these two functions before.
>
This is the code that implements it:
(define sdl-gl-get-attribute
(let ((get (foreign-lambda int "SDL_GL_GetAttribute" unsigned-int
(pointer int))))
(lambda (attr)
(let-location ((ptr int))
(let ((r (get attr (location ptr))))
(and (zero? r) ptr))))))
I haven't used this before. Is this the correct implementation?
cheers,
felix