diff options
Diffstat (limited to 'sdl2/video.scm')
-rw-r--r-- | sdl2/video.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sdl2/video.scm b/sdl2/video.scm index 0db5314..7991697 100644 --- a/sdl2/video.scm +++ b/sdl2/video.scm @@ -63,6 +63,7 @@ delete-gl-context! call-with-gl-context swap-gl-window + gl-context-make-current! set-gl-attribute! set-gl-swap-interval!)) @@ -292,6 +293,12 @@ that takes the size of the desktop." (sdl-error "make-gl-context" "failed to create OpenGL context") (wrap-gl-context ptr)))) +(define (gl-context-make-current! window context) + "Make CONTEXT the current context for rendering to WINDOW in the +current thread." + (unless (zero? (ffi:sdl-gl-make-current (unwrap-window window) (unwrap-gl-context context))) + (sdl-error "gl-make-current" "failed to set current GL context"))) + (define (delete-gl-context! context) "Delete CONTEXT, an OpenGL context object." (ffi:sdl-gl-delete-context (unwrap-gl-context context))) |