[client] egl: allow for partial texture updates

This commit is contained in:
Geoffrey McRae committed 2022-05-21 21:21:16 +10:00
1 parent 7ad3610276
commit 1fcdcc8725
4 files changed
+67 -6

No files matched your search

+6 -4
View File
@@ -111,11 +111,13 @@ static bool egl_texBufferUpdate(EGL_Texture * texture, const EGL_TexUpdate * upd
DEBUG_ASSERT(update->type == EGL_TEXTYPE_BUFFER);
glBindTexture(GL_TEXTURE_2D, this->tex[0]);
glPixelStorei(GL_UNPACK_ROW_LENGTH, texture->format.pitch);
glPixelStorei(GL_UNPACK_ROW_LENGTH, update->pitch);
glTexSubImage2D(GL_TEXTURE_2D,
0, 0, 0,
texture->format.width,
texture->format.height,
0,
update->x,
update->y,
update->width,
update->height,
texture->format.format,
texture->format.dataType,
update->buffer);