forked from go/golangs_learn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
479 B
25 lines
479 B
3 years ago
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||
|
package main
|
||
|
|
||
|
import "gioui.org/app"
|
||
|
|
||
|
/*
|
||
|
#cgo CFLAGS: -DEGL_NO_X11
|
||
|
#cgo LDFLAGS: -lEGL -lGLESv2
|
||
|
|
||
|
#include <EGL/egl.h>
|
||
|
#include <GLES3/gl3.h>
|
||
|
#define EGL_EGLEXT_PROTOTYPES
|
||
|
#include <EGL/eglext.h>
|
||
|
|
||
|
*/
|
||
|
import "C"
|
||
|
|
||
|
func getDisplay(ve app.ViewEvent) C.EGLDisplay {
|
||
|
return C.eglGetDisplay(C.EGLNativeDisplayType(ve.Display))
|
||
|
}
|
||
|
|
||
|
func nativeViewFor(e app.ViewEvent) C.EGLNativeWindowType {
|
||
|
return C.EGLNativeWindowType(uintptr(e.Window))
|
||
|
}
|