elif fmat.has_channel('i') and fmat.num_channels() == 1:
return 'GL_INTENSITY'
else:
- assert False
+ sys.exit("error, could not determine base format for {0}, check swizzle".format(fmat.name));
def get_gl_data_type(fmat):
if fmat.is_compressed():
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+import sys
+
VOID = 'x'
UNSIGNED = 'u'
SIGNED = 's'
block_height = int(fields[3])
colorspace = fields[9]
- swizzle = Swizzle(fields[8])
+ try:
+ swizzle = Swizzle(fields[8])
+ except:
+ sys.exit("error parsing swizzle for format " + name)
channels = _parse_channels(fields[4:8], layout, colorspace, swizzle)
yield Format(name, layout, block_width, block_height, channels, swizzle, colorspace)