Changeset 13302 in project


Ignore:
Timestamp:
02/14/09 16:40:39 (11 years ago)
Author:
felix winkelmann
Message:

added support for some OpenGL routines, suggested by Koen Weddepol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/sdl/sdl.scm

    r4670 r13302  
    742742(define sdl-joystick-close (foreign-lambda void "SDL_JoystickClose"
    743743                                           SDL_Joystick))
     744
     745;---------------------------------------------------------------------------
     746;
     747; OpenGL stuff:
     748
     749(--sdl-flags "SDL_GL_RED_SIZE"
     750             "SDL_GL_GREEN_SIZE"
     751             "SDL_GL_BLUE_SIZE"
     752             "SDL_GL_ALPHA_SIZE"
     753             "SDL_GL_BUFFER_SIZE"
     754             "SDL_GL_DOUBLEBUFFER"
     755             "SDL_GL_DEPTH_SIZE"
     756             "SDL_GL_STENCIL_SIZE"
     757             "SDL_GL_ACCUM_RED_SIZE"
     758             "SDL_GL_ACCUM_GREEN_SIZE"
     759             "SDL_GL_ACCUM_BLUE_SIZE"
     760             "SDL_GL_ACCUM_ALPHA_SIZE"
     761             "SDL_GL_STEREO"
     762             "SDL_GL_MULTISAMPLEBUFFERS"
     763             "SDL_GL_MULTISAMPLESAMPLES"
     764             "SDL_GL_SWAP_CONTROL"
     765             "SDL_GL_ACCELERATED_VISUAL")
     766
     767(define sdl-gl-swap-buffers (foreign-lambda void "SDL_GL_SwapBuffers"))
     768(define sdl-gl-set-attribute (foreign-lambda int "SDL_GL_SetAttribute" unsigned-int int))
     769
     770(define sdl-gl-get-attribute
     771  (let ((get (foreign-lambda int "SDL_GL_GetAttribute" unsigned-int (pointer int))))
     772    (lambda (attr)
     773      (let-location ((ptr int))
     774        (let ((r (get attr (location ptr))))
     775          (and (zero? r) ptr))))))
     776
    744777;---------------------------------------------------------------------------
    745778
Note: See TracChangeset for help on using the changeset viewer.