diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2016-04-26 20:29:23 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2016-04-26 20:29:23 +0800 |
commit | 7700243bd49278692c8218fdf8358169672d7a13 (patch) | |
tree | e0d92b15499b09ead6b1302fd4796ad232ef4e09 /gdk/gdkglcontext.c | |
parent | 71bb1bebc0174f95f2cafd632ec3c5a91e996d20 (diff) | |
download | gtk+-7700243bd49278692c8218fdf8358169672d7a13.tar.gz |
gdk/gdkglcontext.c: Avoid a GCCism
Pointer arithmetic on GLvoid* (a void*) is a GCCism, so cast it to an
unsigned char*, which is the type cairo_image_surface_get_data() returns.
Diffstat (limited to 'gdk/gdkglcontext.c')
-rw-r--r-- | gdk/gdkglcontext.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 87534c6eec..44ef88b59a 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -274,14 +274,14 @@ gdk_gl_context_upload_texture (GdkGLContext *context, glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); for (i = 0; i < height; i++) - glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, data + (i * stride)); + glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, (unsigned char*) data + (i * stride)); } else { glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL); for (i = 0; i < height; i++) - glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data + (i * stride)); + glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, (unsigned char*) data + (i * stride)); } } } |