コード例 #1
0
ファイル: tex.py プロジェクト: Brachi/albam
 def calculate_mipmap_offsets(mipmap_count, width, height, fmt, start_offset):
     offsets = [start_offset]
     current_offset = start_offset
     for i in range(mipmap_count - 1):
         size = DDS.calculate_mipmap_size(width, height, i, fmt)
         current_offset += size
         offsets.append(current_offset)
     return offsets
コード例 #2
0
 def calculate_mipmap_offsets(mipmap_count, width, height, fmt,
                              start_offset):
     offsets = [start_offset]
     current_offset = start_offset
     for i in range(mipmap_count - 1):
         size = DDS.calculate_mipmap_size(width, height, i, fmt)
         current_offset += size
         offsets.append(current_offset)
     return offsets