Add bufferOffset to CopyBufferToTexture.

This commit is contained in:
Corentin Wallez
2017-05-09 16:57:52 +02:00
committed by Corentin Wallez
parent a2d4d14bd4
commit 7f433a5b52
8 changed files with 17 additions and 13 deletions

View File

@@ -74,7 +74,8 @@ namespace opengl {
glBindTexture(target, texture->GetHandle());
glTexSubImage2D(target, copy->level, copy->x, copy->y, copy->width, copy->height,
format.format, format.type, nullptr);
format.format, format.type,
reinterpret_cast<void*>(static_cast<uintptr_t>(copy->bufferOffset)));
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
}
break;