Esempio n. 1
0
//SetGammaRamp sets the current gamma ramp for the monitor.
func (m *Monitor) SetGammaRamp(ramp *GammaRamp) {
	var rampC C.GLFWgammaramp

	length := len(ramp.Red)

	for i := 0; i < length; i++ {
		C.SetGammaAtIndex(rampC.red, C.int(i), C.ushort(ramp.Red[i]))
		C.SetGammaAtIndex(rampC.green, C.int(i), C.ushort(ramp.Green[i]))
		C.SetGammaAtIndex(rampC.blue, C.int(i), C.ushort(ramp.Blue[i]))
	}

	C.glfwSetGammaRamp(m.data, &rampC)
}
Esempio n. 2
0
File: glfw.go Progetto: maun/glfw
func SetGammaRamp(gammaRamp *GammaRamp) {
	cPtr := gammaRamp.toPtr()
	defer C.free(unsafe.Pointer(cPtr))
	C.glfwSetGammaRamp(cPtr)
}