Exemple #1
0
    def __init__(self, arg=None, template=None):
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # DDS
        self.header_string = FixedString()

        # Always 124 + 4 bytes for headerstring, header ends at 128.
        self.size = 124
        self.flags = HeaderFlags()

        # The texture height.
        self.height = 0

        # The texture width.
        self.width = 0
        self.linear_size = 0
        self.depth = 0
        self.mipmap_count = 0
        self.reserved_1 = Array()
        self.pixel_format = PixelFormat()
        self.caps_1 = Caps1()
        self.caps_2 = Caps2()
        self.caps_3 = 0
        self.caps_4 = 0
        self.unused = 0
        self.dx_10 = Dxt10Header()
Exemple #2
0
    def __init__(self, context, arg=None, template=None):
        self.name = ''
        self._context = context
        self.arg = arg
        self.template = template
        self.io_size = 0
        self.io_start = 0

        # DDS
        self.header_string = FixedString(self.context, 4, None)

        # Always 124 + 4 bytes for headerstring, header ends at 128.
        self.size = 124
        self.flags = HeaderFlags()

        # The texture height.
        self.height = 0

        # The texture width.
        self.width = 0
        self.linear_size = 0
        self.depth = 0
        self.mipmap_count = 0
        self.reserved_1 = numpy.zeros((11), dtype='uint')
        self.pixel_format = PixelFormat(self.context, None, None)
        self.caps_1 = Caps1()
        self.caps_2 = Caps2()
        self.caps_3 = 0
        self.caps_4 = 0
        self.unused = 0
        self.dx_10 = Dxt10Header(self.context, None, None)
        self.set_defaults()
Exemple #3
0
 def set_defaults(self):
     self.header_string = FixedString(self.context, 4, None)
     self.size = 124
     self.flags = HeaderFlags()
     self.height = 0
     self.width = 0
     self.linear_size = 0
     self.depth = 0
     self.mipmap_count = 0
     self.reserved_1 = numpy.zeros((11), dtype='uint')
     self.pixel_format = PixelFormat(self.context, None, None)
     self.caps_1 = Caps1()
     self.caps_2 = Caps2()
     self.caps_3 = 0
     self.caps_4 = 0
     self.unused = 0
     if self.pixel_format.four_c_c == 808540228:
         self.dx_10 = Dxt10Header(self.context, None, None)