gl: Vectorize GL_TEMP_IMAGE_SLOT expression

This commit is contained in:
kd-11 2024-02-01 03:44:48 +03:00 committed by Megamouse
parent ce571cb6ca
commit bb22afb7f1
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
#define GL_VERTEX_TEXTURES_START (GL_FRAGMENT_TEXTURES_START + 16)
#define GL_STENCIL_MIRRORS_START (GL_VERTEX_TEXTURES_START + 4)
#define GL_STREAM_BUFFER_START (GL_STENCIL_MIRRORS_START + 16)
#define GL_TEMP_IMAGE_SLOT 31
#define GL_TEMP_IMAGE_SLOT(x) (31 - x)
#define UBO_SLOT(x) (x + 8)
#define SSBO_SLOT(x) (x)

View File

@ -24,7 +24,7 @@ namespace gl
glGenTextures(1, &m_id);
// Must bind to initialize the new texture
gl::get_command_context()->bind_texture(GL_TEMP_IMAGE_SLOT, target, m_id, GL_TRUE);
gl::get_command_context()->bind_texture(GL_TEMP_IMAGE_SLOT(0), target, m_id, GL_TRUE);
const GLenum storage_fmt = sizedfmt_to_ifmt(sized_format);
switch (target)