From 8b456ce9e93265f4cc7c42c4392740d7253171bf Mon Sep 17 00:00:00 2001 From: lisyarus Date: Mon, 27 Feb 2023 12:42:41 +0300 Subject: [PATCH] Bind gfx::buffer when attaching it to buffer texture (otherwise it doesn't work if the buffer wasn't bound at least once yet) --- libs/gfx/include/psemek/gfx/texture.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/gfx/include/psemek/gfx/texture.hpp b/libs/gfx/include/psemek/gfx/texture.hpp index cfa62947..c97ae50f 100644 --- a/libs/gfx/include/psemek/gfx/texture.hpp +++ b/libs/gfx/include/psemek/gfx/texture.hpp @@ -576,6 +576,7 @@ namespace psemek::gfx inline void buffer_texture::buffer(GLenum internal_format, gfx::buffer const & buffer) { + buffer.bind(); bind(); gl::TexBuffer(target, internal_format, buffer.id()); }