Elliott Slaughter <[EMAIL PROTECTED]> writes:
>
> On Mon, Sep 22, 2008 at 12:34 PM, Michael McDermott <mcdermott.michaelj-
[EMAIL PROTECTED]> wrote:
>
> Hello,I was attempting to use SDL (lispbuilder-sdl) to load a texture for use
in OpenGL (cl-opengl). The call to gl:tex-parameter-2d requires passing in a
sequence of pixels. In the original struct, SDL_surface has a member, pixels.
What I am trying to figure out is how to access the pixels member in the
wrapper class for SDL_surface.
>
>
> (slot-value surface 'sdl::pixels)?
>
Make sure that you are using 4 bytes per pixel and not the usual 3 bytes per
pixel (CONVERT-SURFACE will do this). You can get hold of the SDL_Surface raw
pixel data as follows. This will also lock the SDL_Surface as appropriate. All
operations on pixel data must occur within the scope of WITH-PIXEL.
(sdl-base::with-pixel (pixels (sdl:fp a-surface))
(sdl-base::pixel-data pixels)))
- Luke
_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder