ENH: optimize the texture logic of partplate

1. reduce the icon size to 256 from 1024
2. limit the mipmap minsize to 2

Change-Id: I906f4dc2e0aa2e83e05a0d60cd0283679f41d89a
This commit is contained in:
lane.wei 2022-12-09 23:22:44 +08:00 committed by Lane.Wei
parent c69b7780ad
commit 6bccef66b0
2 changed files with 18 additions and 16 deletions

View file

@ -790,7 +790,7 @@ bool GLTexture::load_from_svg(const std::string& filename, bool use_mipmaps, boo
int lod_w = m_width;
int lod_h = m_height;
GLint level = 0;
while (lod_w > 1 || lod_h > 1) {
while (lod_w >= 4 && lod_h >= 4) {
++level;
lod_w = std::max(lod_w / 2, 1);