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

Method SetMultisample

vgpu/image.go:223–240  ·  view source on GitHub ↗

SetMultisample sets the number of multisampling to decrease aliasing 4 is typically sufficient. Values must be power of 2.

(nsamp int)

Source from the content-addressed store, hash-verified

221// SetMultisample sets the number of multisampling to decrease aliasing
222// 4 is typically sufficient. Values must be power of 2.
223func (im *ImageFormat) SetMultisample(nsamp int) {
224 ns := vk.SampleCount1Bit
225 switch nsamp {
226 case 2:
227 ns = vk.SampleCount2Bit
228 case 4:
229 ns = vk.SampleCount4Bit
230 case 8:
231 ns = vk.SampleCount8Bit
232 case 16:
233 ns = vk.SampleCount16Bit
234 case 32:
235 ns = vk.SampleCount32Bit
236 case 64:
237 ns = vk.SampleCount64Bit
238 }
239 im.Samples = ns
240}
241
242// NSamples returns the integer number of samples based on Samples flag setting
243func (im *ImageFormat) NSamples() int {

Callers 8

ConfigFramebufferMethod · 0.80
ConfigGrabMethod · 0.80
ConfigSurfaceImageMethod · 0.80
DefaultsMethod · 0.80
DefaultsMethod · 0.80
ConfigImageMethod · 0.80
mainFunction · 0.80
ConfigFrameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected