NSamples returns the integer number of samples based on Samples flag setting
()
| 241 | |
| 242 | // NSamples returns the integer number of samples based on Samples flag setting |
| 243 | func (im *ImageFormat) NSamples() int { |
| 244 | ns := 1 |
| 245 | switch im.Samples { |
| 246 | case vk.SampleCount1Bit: |
| 247 | ns = 1 |
| 248 | case vk.SampleCount2Bit: |
| 249 | ns = 2 |
| 250 | case vk.SampleCount4Bit: |
| 251 | ns = 4 |
| 252 | case vk.SampleCount8Bit: |
| 253 | ns = 8 |
| 254 | case vk.SampleCount16Bit: |
| 255 | ns = 16 |
| 256 | case vk.SampleCount32Bit: |
| 257 | ns = 32 |
| 258 | case vk.SampleCount64Bit: |
| 259 | ns = 64 |
| 260 | } |
| 261 | return ns |
| 262 | } |
| 263 | |
| 264 | // Size32 returns size as uint32 values |
| 265 | func (im *ImageFormat) Size32() (width, height uint32) { |