[client] egl: allow for partial texture updates

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

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);