From 6738b95eca491fe7ea062ae459464a7fbbcfa1e5 Mon Sep 17 00:00:00 2001 From: Pavel Korolev Date: Sun, 12 Jul 2020 13:40:14 +0300 Subject: [PATCH] Dynamically assemble graphics context --- graphics/context.lisp | 2 ++ graphics/system.lisp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/graphics/context.lisp b/graphics/context.lisp index 6004519..263ae84 100644 --- a/graphics/context.lisp +++ b/graphics/context.lisp @@ -16,6 +16,8 @@ (defmethod initialize-instance :after ((this graphics-context) &key system) (with-slots (executor) this + (unless system + (error ":system missing")) (flet ((%invoke (task) (let ((*system* system) (*graphics-context* this) diff --git a/graphics/system.lisp b/graphics/system.lisp index 6bf6b18..0c9290e 100644 --- a/graphics/system.lisp +++ b/graphics/system.lisp @@ -77,7 +77,8 @@ (defun graphics-context-assembly-flow () - (>> (assembly-flow 'graphics-context :system (graphics)) + (>> (->> () + (assembly-flow 'graphics-context :system (graphics))) (for-graphics (instance) (register-shared-context instance))))