aboutsummaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-16 23:05:49 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-16 23:05:49 +0100
commitccd0e65a0ddccd9c52d4c075ec1cad41ae7edb40 (patch)
treefac6702c78c2fbb18bf049cdb670b1e98cc32ce6 /src/graphics
parente0b1d92dd4ab93ac0f75dda7adc0f5274558dec1 (diff)
Make unpack alignment byte-sized globally
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/texture.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/graphics/texture.c b/src/graphics/texture.c
index 0ae21cf..9ea9b12 100644
--- a/src/graphics/texture.c
+++ b/src/graphics/texture.c
@@ -122,9 +122,7 @@ int mgl_texture_update(mgl_texture *self, const unsigned char *data, int offset_
mgl_context *context = mgl_get_context();
context->gl.glBindTexture(GL_TEXTURE_2D, self->id);
const mgl_texture_format texture_format = mgl_image_format_to_mgl_texture_format(format);
- context->gl.glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
context->gl.glTexSubImage2D(GL_TEXTURE_2D, 0, offset_x, offset_y, width, height, mgl_texture_format_to_source_opengl_format(texture_format), GL_UNSIGNED_BYTE, data);
- context->gl.glPixelStorei(GL_UNPACK_ALIGNMENT, 0);
context->gl.glBindTexture(GL_TEXTURE_2D, 0);
return 0;
}