Merge pull request #3 from SubstituteR/opengldpi

Better non-braching check
This commit is contained in:
Riley S 2021-02-24 00:38:49 -05:00 committed by GitHub
commit e6d7c825c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1412,12 +1412,11 @@ rasterRenderFast(Raster *raster, int32 x, int32 y)
case Raster::CAMERA:
setActiveTexture(0);
glBindTexture(GL_TEXTURE_2D, natdst->texid);
if(dpiScale.x != 1 || dpiScale.y != 1)
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x, (dst->height-src->height)-y,
src->width/dpiScale.x, src->height/dpiScale.y, src->width, src->height);
else
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x, (dst->height-src->height)-y,
0, 0, src->width, src->height);
src->width - src->width/dpiScale.x, src->height - src->height/dpiScale.y,
src->width, src->height);
glBindTexture(GL_TEXTURE_2D, boundTexture[0]);
return 1;
}