MCPcopy Create free account
hub / github.com/cogentcore/core / NSamples

Method NSamples

vgpu/image.go:243–262  ·  view source on GitHub ↗

NSamples returns the integer number of samples based on Samples flag setting

()

Source from the content-addressed store, hash-verified

241
242// NSamples returns the integer number of samples based on Samples flag setting
243func (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
265func (im *ImageFormat) Size32() (width, height uint32) {

Callers 1

GrabDepthImageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected