Fix unpack row len with 16-bit cores on desktop.

Missed call to UNPACK_ROW_LENGTH :(
This commit is contained in:
Themaister 2014-01-03 14:42:00 +01:00
parent 81fc0f621a
commit 9c218bcf07

View File

@ -1275,6 +1275,8 @@ static inline void gl_copy_frame(void *data, const void *frame, unsigned width,
gl_convert_frame_rgb16_32(gl, gl->conv_buffer, frame, width, height, pitch);
buf = gl->conv_buffer;
}
else
glPixelStorei(GL_UNPACK_ROW_LENGTH, pitch / gl->base_size);
glTexSubImage2D(GL_TEXTURE_2D,
0, 0, 0, width, height, gl->texture_type,
@ -1286,9 +1288,9 @@ static inline void gl_copy_frame(void *data, const void *frame, unsigned width,
glTexSubImage2D(GL_TEXTURE_2D,
0, 0, 0, width, height, gl->texture_type,
gl->texture_fmt, frame);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
}
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
#endif
}