| 177 | |
| 178 | |
| 179 | class Resource(object): |
| 180 | def __init__(self, stream, string_table, version): |
| 181 | self.register_index = stream.read_uint8() |
| 182 | self.name = string_table.get_string(stream.read_uint32()) |
| 183 | self.type = stream.read_uint8() |
| 184 | if version > 12: |
| 185 | self.array_count = stream.read_uint32() |
| 186 | else: |
| 187 | self.array_count = 1 |
| 188 | self.is_srgb = stream.read_uint8() != 0 |
| 189 | self.is_autoregister = stream.read_uint8() != 0 |
| 190 | if self.type <= 5: |
| 191 | self.trinity_type = 'TriTextureParameter' |
| 192 | else: |
| 193 | self.trinity_type = 'Tr2GeometryBufferParameter' |
| 194 | |
| 195 | |
| 196 | class UAV(object): |