Bind gfx::buffer when attaching it to buffer texture (otherwise it doesn't work if the buffer wasn't bound at least once yet)

This commit is contained in:
Nikita Lisitsa 2023-02-27 12:42:41 +03:00
parent 32da717a55
commit 8b456ce9e9

View file

@ -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());
}