forked from AuroraMiddleware/gtk
use glTexSubImage2D instead of glTextureSubImage2D
This commit is contained in:
parent
6455a54f6c
commit
ea6d3f589f
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user