Hi,
I am trying to run the OpenGL example from the UsingLispbuilderSDL
wiki manual with double buffering enabled, just adding
(sdl:set-gl-attribute :SDL-GL-DOUBLEBUFFER 1) before the sdl:window
call.
(defun opengl-test-1 ()
(sdl:with-init ()
(sdl:set-gl-attribute :SDL-GL-DOUBLEBUFFER 1)
(sdl:window 250 250
:flags sdl:sdl-opengl
:title-caption "OpenGL Example"
:icon-caption "OpenGL Example")
(gl:clear-color 0 0 0 0)
;; Initialize viewing values.
(gl:matrix-mode :projection)
(gl:load-identity)
(gl:ortho 0 1 0 1 -1 1)
(sdl:with-events ()
(:quit-event () t)
(:idle ()
(gl:clear :color-buffer-bit)
;; Draw white polygon (rectangle) with corners at
;; (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0).
(gl:color 1 1 1)
(gl:with-primitive :polygon
(gl:vertex 0.25 0.25 0)
(gl:vertex 0.75 0.25 0)
(gl:vertex 0.75 0.75 0)
(gl:vertex 0.25 0.75 0))
;; Start processing buffered OpenGL routines.
(sdl:update-display)))))
After running (opengl-test-1) I get memory corruption:
* (opengl-test-1)
CORRUPTION WARNING in SBCL pid 69894(tid 2693764352):
Memory fault at 17c (pc=0x8654d, sp=0x11ffa80)
The integrity of this image is possibly compromised.
Continuing with fingers crossed.
debugger invoked on a SB-SYS:MEMORY-FAULT-ERROR in thread #<THREAD
"initial thread" RUNNING {119BEB99}>:
Unhandled memory fault at #x17C.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
(SB-SYS:MEMORY-FAULT-ERROR)
0]
Without enabled double buffering it works fine. I am running Mac OS X
1.6.1 and SBCL 1.0.31.9 32bit and lispbuilder-sdl from SVN.
--wbr.
_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder