sketch
sketch copied to clipboard
Error in Brownian example
When I try to run the Brownian example, I get the following error:
* (make-instance 'sketch-examples:brownian)
debugger invoked on a SDL2::SDL-RC-ERROR in thread
#<THREAD "SDL2 Main Thread" RUNNING {1004CF4B43}>:
SDL Error (#<SDL-WINDOW {#X00000000}>): Couldn't find matching GLX visual
I am running SBCL 1.2.14 on Ubuntu 15.10, with Intel HD Graphics 5500. I guess there's a good chance this is something to do with the Intel graphics drivers.
Commenting out these lines seems to solve the problem, but I cannot say I know why.
Unfortunately, it is a known problem with Sketch (probably cl-sdl2 and cl-opengl as well, maybe even native libs) and Intel drivers on Linux - turning off double buffering is not possible. The Brownian example uses :COPY-PIXELS set to T to draw incrementally, that is, without clearing the screen between frames. Commenting out those lines helps, but makes the example (and everything that uses :COPY-PIXELS) work differently.
I won't be fixing this directly because using (sdl2:gl-set-attr :doublebuffer 0)) was a hack in the first place. What I really want to do is to implement this (and many other nice things) using FBOs. I can't promise anything, but it's pretty high on my list of priorities and might even happen before the next Quicklisp release.
Thank you for the reply and explanation. I did suspect that my "fix" would break other things.