adam-gui/vendor/github.com/fyne-io/glfw-js/hint_glfw.go

33 lines
629 B
Go
Raw Normal View History

2024-04-29 19:13:50 +02:00
// +build !js
package glfw
import "github.com/go-gl/glfw/v3.3/glfw"
type Hint int
const (
AlphaBits = Hint(glfw.AlphaBits)
DepthBits = Hint(glfw.DepthBits)
StencilBits = Hint(glfw.StencilBits)
Samples = Hint(glfw.Samples)
Resizable = Hint(glfw.Resizable)
// These hints used for WebGL contexts, ignored on desktop.
PremultipliedAlpha = noopHint
PreserveDrawingBuffer
PreferLowPowerToHighPerformance
FailIfMajorPerformanceCaveat
)
// noopHint is ignored.
const noopHint Hint = -1
func WindowHint(target Hint, hint int) {
if target == noopHint {
return
}
glfw.WindowHint(glfw.Hint(target), hint)
}