From 8b13e3adaf435c29de7c5b70c349b9f31cb26241 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Mon, 11 Mar 2019 19:24:08 +0000 Subject: [PATCH] Reserve 0 in the framebuffer thing (WIP) --- GL/framebuffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GL/framebuffer.c b/GL/framebuffer.c index 6b5e67e..8e86493 100644 --- a/GL/framebuffer.c +++ b/GL/framebuffer.c @@ -18,6 +18,9 @@ static NamedArray FRAMEBUFFERS; void _glInitFramebuffers() { named_array_init(&FRAMEBUFFERS, sizeof(FrameBuffer), 32); + + // Reserve zero so that it is never given to anyone as an ID! + named_array_reserve(&FRAMEBUFFERS, 0); } void _glWipeTextureOnFramebuffers(GLuint texture) {