anchor.diff:     ;;
      (surface-title-function :initform #'sdl-surface-title)
      ;;
  -   (set-surface-title-function :initform #'sdl-set-surface-title)))
  +   (set-surface-title-function :initform #'sdl-set-surface-title)
  +   ;;
  +   (make-gl-context-shared-with-current-context-function
  +    :initform #'make-shared-sdl-context)))
   
   (register-host 'sdl-api)
   
  
positive.code: (defvar *initd* nil)
  
  ;;======================================================================
  ;; api v1
  
  (defgeneric sdl-init (&rest init-flags)
    (:method (&rest init-flags)
  
negative.code:     (assert context ()
              "CEPL.SDL2: Could not find a suitable context for CEPL.
  Your machine must support at least GL 3.3")
      context))
  
  (defun make-shared-sdl-context (current-gl-context surface version double-buffer
                                  alpha-size depth-size stencil-size buffer-size
                                  red-size green-size blue-size)
    (setf cl-opengl-bindings::*gl-get-proc-address* #'sdl2::gl-get-proc-address)
    (sdl2:gl-set-attr :alpha-size alpha-size)
    (sdl2:gl-set-attr :depth-size depth-size)
    (when stencil-size
      (sdl2:gl-set-attr :stencil-size stencil-size))
    (sdl2:gl-set-attr :red-size red-size)
    (sdl2:gl-set-attr :green-size green-size)
    (sdl2:gl-set-attr :blue-size blue-size)
    (sdl2:gl-set-attr :buffer-size buffer-size)
    (sdl2:gl-set-attr :doublebuffer (if double-buffer 1 0))
    (sdl2:gl-set-attr :share-with-current-context 1)
    ;;
    (let ((context (if version
                       (create-context-by-version surface version)
                       (search-for-context surface))))
      (assert context ()
              "CEPL.SDL2: Could not find a suitable context for CEPL.
  Your machine must support at least GL 3.3")
      (values context surface)))
  
  (defvar *core-context* t)
  
  