|
|
@ -692,18 +692,17 @@ class MaterialConverter: |
|
|
|
allowed_formats = key.allowed_formats |
|
|
|
allowed_formats = key.allowed_formats |
|
|
|
if key.mipmap: |
|
|
|
if key.mipmap: |
|
|
|
compression = plBitmap.kDirectXCompression |
|
|
|
compression = plBitmap.kDirectXCompression |
|
|
|
dxt = plBitmap.kDXT5 if key.use_alpha or key.calc_alpha else plBitmap.kDXT1 |
|
|
|
|
|
|
|
elif "PNG" in allowed_formats and self._mgr.getVer() == pvMoul: |
|
|
|
elif "PNG" in allowed_formats and self._mgr.getVer() == pvMoul: |
|
|
|
compression = plBitmap.kPNGCompression |
|
|
|
compression = plBitmap.kPNGCompression |
|
|
|
elif "DDS" in allowed_formats: |
|
|
|
elif "DDS" in allowed_formats: |
|
|
|
compression = plBitmap.kDirectXCompression |
|
|
|
compression = plBitmap.kDirectXCompression |
|
|
|
dxt = plBitmap.kDXT5 if key.use_alpha or key.calc_alpha else plBitmap.kDXT1 |
|
|
|
|
|
|
|
elif "JPG" in allowed_formats: |
|
|
|
elif "JPG" in allowed_formats: |
|
|
|
compression = plBitmap.kJPEGCompression |
|
|
|
compression = plBitmap.kJPEGCompression |
|
|
|
elif "BMP" in allowed_formats: |
|
|
|
elif "BMP" in allowed_formats: |
|
|
|
compression = plBitmap.kUncompressed |
|
|
|
compression = plBitmap.kUncompressed |
|
|
|
else: |
|
|
|
else: |
|
|
|
raise RuntimeError(allowed_formats) |
|
|
|
raise RuntimeError(allowed_formats) |
|
|
|
|
|
|
|
dxt = plBitmap.kDXT5 if key.use_alpha or key.calc_alpha else plBitmap.kDXT1 |
|
|
|
|
|
|
|
|
|
|
|
# Grab the image data from OpenGL and stuff it into the plBitmap |
|
|
|
# Grab the image data from OpenGL and stuff it into the plBitmap |
|
|
|
helper = GLTexture(key) |
|
|
|
helper = GLTexture(key) |
|
|
|