File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,26 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3737|#
3838;; Absolutely minimal OpenGL (ES) interface
3939
40- (define glcore: debuglevel 0)
41- (define (glcore: log level . x)
42- (if (>= glcore: debuglevel level) (apply log-system (append (list "glcore: " x)))))
40+ ;; * Compiletime
41+
42+ #| ;; enable manually in source
43+ (define-cond-expand-feature profile)
44+ ;; |#
45+
46+ (cond-expand
47+ (debug
48+ (define glcore: debuglevel 0)
49+ (define (glcore: log level . x)
50+ (if (>= glcore: debuglevel level) (apply log-system (append (list "glcore: " x))))))
51+ (else))
52+
53+ (cond-expand
54+ (profile ;; ignore even when otherwise in `debug` mode
55+ (define-macro (glcore: log . ignored) #!void))
56+ (debug) ;; defined by previous `debug` expansion
57+ (else (define-macro (glcore: log . ignored) #!void)))
58+
59+ ;; * Runtime
4360
4461;; ----------------------------------
4562;; Initialization
You can’t perform that action at this time.
0 commit comments