mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
[Fix] (MG_State/GL_Texture): SubImage2D missing a row of texels
This commit is contained in:
@@ -86,7 +86,7 @@ namespace MobileGL {
|
||||
// Should take states from glPixelStorei/glPixelStoref into account
|
||||
SizeT srcOffset = row * width * bytesPerPixel;
|
||||
|
||||
if (dstOffset + width * bytesPerPixel < data.size()) {
|
||||
if (dstOffset + width * bytesPerPixel <= data.size()) {
|
||||
Memcpy(data.data() + dstOffset, srcData + srcOffset, width * bytesPerPixel);
|
||||
} else {
|
||||
MG_State::pGLContext->RecordError(
|
||||
|
||||
Reference in New Issue
Block a user