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 authored and Lane.Wei committed 2022-12-15 04:38:15 -05:00
1 parent c69b7780ad
commit 6bccef66b0
2 files changed
+18 -16

No files matched your search

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