Пример #1
0
func Initialize(
	disp Display, major, minor *int32) bool {
	return goBoolean(C.eglInitialize(
		C.EGLDisplay(unsafe.Pointer(disp)),
		(*C.EGLint)(major),
		(*C.EGLint)(minor)))
}
Пример #2
0
func (display *Display) Initialize() error {
	if display.eglDisplay == noDisplay {
		return getError()
	}

	var major, minor C.EGLint
	success := C.eglInitialize(display.eglDisplay, &major, &minor)
	//fmt.Printf("display == %v, version == %d.%d, success == %d\n", display.eglDisplay, major, minor, success)
	if success == C.EGL_FALSE {
		return getError()
	}
	display.majorVersion = int(major)
	display.minorVersion = int(minor)

	return nil
}