From 7dec9933f6bd8cf933c4a998768c4a9f70a64046 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 29 Oct 2020 15:45:04 +0000 Subject: [PATCH] Test that creating and destroying contexts doens't have side effects --- util/test/demos/gl/gl_vao_0.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util/test/demos/gl/gl_vao_0.cpp b/util/test/demos/gl/gl_vao_0.cpp index 010e4f3fc..c479db6fa 100644 --- a/util/test/demos/gl/gl_vao_0.cpp +++ b/util/test/demos/gl/gl_vao_0.cpp @@ -85,6 +85,16 @@ void main() uint32_t idxs[3] = {0, 1, 2}; + for(int i = 0; i < 100; i++) + { + GraphicsWindow *win2 = MakeWindow(32, 32, NULL); + void *ctx2 = MakeContext(win2, mainContext); + ActivateContext(win2, ctx2); + ActivateContext(mainWindow, mainContext); + DestroyContext(ctx2); + delete win2; + } + GLuint vb = MakeBuffer(); glBindBuffer(GL_ARRAY_BUFFER, vb); glBufferStorage(GL_ARRAY_BUFFER, sizeof(DefaultTri), DefaultTri, 0);