forked from AuroraMiddleware/gtk
Merge branch 'fix-rgb-upload' into 'master'
gl: Fix RGB uploads Closes #3194 See merge request GNOME/gtk!2620
This commit is contained in:
commit
1b93108d10
@ -291,7 +291,10 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
|
||||
*/
|
||||
if (stride == width * bpp)
|
||||
{
|
||||
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, gl_format, gl_type, data);
|
||||
glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
|
||||
}
|
||||
else if ((!priv->use_es ||
|
||||
(priv->use_es && (priv->gl_version >= 30 || priv->has_unpack_subimage))))
|
||||
@ -302,6 +305,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
|
||||
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, gl_format, gl_type, data);
|
||||
|
||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
|
||||
glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user