use glTexSubImage2D instead of glTextureSubImage2D

This commit is contained in:
Elias Aebi 2019-07-06 16:23:21 +02:00
parent 6455a54f6c
commit ea6d3f589f
2 changed files with 5 additions and 5 deletions

View File

@ -193,10 +193,10 @@ upload_glyph (GlyphCacheKey *key,
if (render_glyph (key, value, &r)) if (render_glyph (key, value, &r))
{ {
glBindTexture (GL_TEXTURE_2D, value->texture_id); glBindTexture (GL_TEXTURE_2D, value->texture_id);
glTextureSubImage2D (value->texture_id, 0, glTexSubImage2D (GL_TEXTURE_2D, 0,
r.x, r.y, r.width, r.height, r.x, r.y, r.width, r.height,
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
r.data); r.data);
g_free (r.data); g_free (r.data);
} }

View File

@ -136,7 +136,7 @@ upload_region_or_else (GskGLIconCache *self,
GskImageRegion *region) GskImageRegion *region)
{ {
glBindTexture (GL_TEXTURE_2D, texture_id); glBindTexture (GL_TEXTURE_2D, texture_id);
glTextureSubImage2D (texture_id, 0, region->x, region->y, region->width, region->height, glTexSubImage2D (GL_TEXTURE_2D, 0, region->x, region->y, region->width, region->height,
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, region->data); GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, region->data);
} }