From 0b145ed3b53bf849adf9bb85a14b6f1e231b9fc3 Mon Sep 17 00:00:00 2001
From: "Adam D. Ruppe" <destructionator@gmail.com>
Date: Tue, 10 Jan 2023 14:03:47 -0500
Subject: [PATCH] set context when initializing

---
 nanovega.d | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nanovega.d b/nanovega.d
index 50c3948..b7ec011 100644
--- a/nanovega.d
+++ b/nanovega.d
@@ -12222,6 +12222,7 @@ version(nanovg_bindbc_opengl_bindings) {
 			};
 
 			this.visibleForTheFirstTime = delegate() {
+				this.setAsCurrentOpenGlContext();
 				nvg = nvgCreateContext();
 				if(nvg is null) throw new Exception("cannot initialize NanoVega");
 			};