Documentation ¶
Index ¶
- Constants
- Variables
- func BindAPI(api uint) bool
- func BindTexImage(d Display, s Surface, buf int) bool
- func ChooseConfig(d Display, atrribs []EGLint, confs []Config) int
- func CopyBuffers(d Display, s Surface, target NativePixmap) bool
- func DestroyContext(d Display, c Context) bool
- func DestroySurface(d Display, s Surface) bool
- func GetConfigAttrib(d Display, conf Config, attr int) (int, bool)
- func GetConfigs(d Display, confs []Config) int
- func Initialize(d Display) bool
- func MakeCurrent(d Display, draw Surface, read Surface, c Context) bool
- func QueryAPI() uint
- func QueryContext(d Display, c Context, attr int, val []EGLint) bool
- func QueryString(d Display, name int) string
- func ReleaseTexImage(d Display, s Surface, buf int) bool
- func ReleaseThread() bool
- func SurfaceAttrib(d Display, s Surface, attr int, val int) bool
- func SwapBuffers(d Display, s Surface) bool
- func SwapInterval(d Display, inv int) bool
- func Terminate(d Display) bool
- func WaitClient() bool
- func WaitGL() bool
- func WaitNative(engine int) bool
- type ClientBuffer
- type Config
- type Context
- type Display
- type EGLContext
- func CreateEGLContext(native NativeObj) *EGLContext
- func CreateEGLContextEx(native NativeObj, depthSize, esVersion int) *EGLContext
- func NewContext(window NativeWindow, ndisplay NativeDisplay) *EGLContext
- func NewContextEx(window NativeWindow, ndisplay NativeDisplay, depthSize, esVersion, minor int) *EGLContext
- func (ctx *EGLContext) GetFormat() int
- func (ctx *EGLContext) InitEGLContext() bool
- func (ctx *EGLContext) InitEGLSurface() bool
- func (ctx *EGLContext) InitEGLSurfaceX() bool
- func (ctx *EGLContext) InitEGLSurface_XX() bool
- func (ctx *EGLContext) IsReady() bool
- func (ctx *EGLContext) ReinitEGLContext() bool
- func (ctx *EGLContext) Resume() bool
- func (ctx *EGLContext) Suspend()
- func (ctx *EGLContext) SwapBuffers() bool
- func (ctx *EGLContext) Terminate()
- type EGLint
- type Error
- type NativeDisplay
- type NativeObj
- type NativePixmap
- type NativeWindow
- type Surface
- func CreatePbufferFromClientBuffer(d Display, buftyp uint, conf Config, buf ClientBuffer, attribs []EGLint) Surface
- func CreatePbufferSurface(d Display, conf Config, attribs []EGLint) Surface
- func CreatePixmapSurface(d Display, conf Config, pixmap NativePixmap, attribs []EGLint) Surface
- func CreateWindowSurface(d Display, conf Config, win NativeWindow, attribs []EGLint) Surface
- func GetCurrentSurface(readdraw int) Surface
- type Window
Constants ¶
View Source
const ( VERSION_1_0 = 1 VERSION_1_1 = 1 VERSION_1_2 = 1 VERSION_1_3 = 1 VERSION_1_4 = 1 )
EGL Versioning
View Source
const ( DONT_CARE = -1 UNKNOWN = -1 /* Constant scale factor by which fractional display resolutions & aspect ratio are scaled when queried as integer values. */ DISPLAY_SCALING = 10000 )
Out-of-band attribute value
View Source
const ( SUCCESS = 0x3000 + iota NOT_INITIALIZED BAD_ACCESS BAD_ALLOC BAD_ATTRIBUTE BAD_CONFIG BAD_CONTEXT BAD_CURRENT_SURFACE BAD_DISPLAY BAD_MATCH BAD_NATIVE_PIXMAP BAD_NATIVE_WINDOW BAD_PARAMETER BAD_SURFACE CONTEXT_LOST //EGL 1.1 - IMG_power_management )
Errors / GetError return values
View Source
const ( BUFFER_SIZE = 0x3020 + iota ALPHA_SIZE BLUE_SIZE GREEN_SIZE RED_SIZE DEPTH_SIZE STENCIL_SIZE CONFIG_CAVEAT CONFIG_ID LEVEL MAX_PBUFFER_HEIGHT MAX_PBUFFER_PIXELS MAX_PBUFFER_WIDTH NATIVE_RENDERABLE NATIVE_VISUAL_ID NATIVE_VISUAL_TYPE SAMPLES SAMPLE_BUFFERS SURFACE_TYPE TRANSPARENT_TYPE TRANSPARENT_BLUE_VALUE TRANSPARENT_GREEN_VALUE TRANSPARENT_RED_VALUE // Attrib list terminator NONE BIND_TO_TEXTURE_RGB BIND_TO_TEXTURE_RGBA MIN_SWAP_INTERVAL MAX_SWAP_INTERVAL LUMINANCE_SIZE ALPHA_MASK_SIZE COLOR_BUFFER_TYPE RENDERABLE_TYPE // Pseudo-attribute (not queryable) MATCH_NATIVE_PIXMAP CONFORMANT )
Config attributes
View Source
const ( PBUFFER_BIT = 0x0001 << iota PIXMAP_BIT WINDOW_BIT VG_COLORSPACE_LINEAR_BIT VG_ALPHA_FORMAT_PRE_BIT MULTISAMPLE_RESOLVE_BOX_BIT SWAP_BEHAVIOR_PRESERVED_BIT )
SURFACE_TYPE mask bits
View Source
const ( OPENGL_ES_BIT = 0x0001 << iota OPENVG_BIT // 0x02 OPENGL_ES2_BIT // 0x04 OPENGL_BIT // 0x08 OPENGL_ES3_BIT // 0x40 )
RENDERABLE_TYPE mask bits
View Source
const ( // CONFIG_CAVEAT values SLOW_CONFIG = 0x3050 + iota NON_CONFORMANT_CONFIG // TRANSPARENT_TYPE value TRANSPARENT_RGB /* QueryString targets */ VENDOR VERSION EXTENSIONS /* QuerySurface & SurfaceAttrib & CreatePbufferSurface targets */ HEIGHT WIDTH LARGEST_PBUFFER /* GetCurrentSurface targets */ DRAW READ /* WaitNative engines */ CORE_NATIVE_ENGINE /* Config attribute values for EGL_TEXTURE_FORMAT*/ NO_TEXTURE TEXTURE_RGB TEXTURE_RGBA TEXTURE_2D )
View Source
const ( // more QuerySurface & SurfaceAttrib & CreatePbufferSurface targets TEXTURE_FORMAT = 0x3080 + iota TEXTURE_TARGET MIPMAP_TEXTURE MIPMAP_LEVEL /* BindTexImage & ReleaseTexImage buffer targets */ BACK_BUFFER SINGLE_BUFFER RENDER_BUFFER /* OpenVG color spaces and alpha formats */ VG_COLORSPACE VG_ALPHA_FORMAT VG_COLORSPACE_sRGB VG_COLORSPACE_LINEAR VG_ALPHA_FORMAT_NONPRE VG_ALPHA_FORMAT_PRE /* QueryString target */ CLIENT_APIS /* Config attribute values */ RGB_BUFFER LUMINANCE_BUFFER HORIZONTAL_RESOLUTION VERTICAL_RESOLUTION PIXEL_ASPECT_RATIO SWAP_BEHAVIOR /* Back buffer swap behaviors */ BUFFER_PRESERVED BUFFER_DESTROYED /* CreatePbufferFromClientBuffer buffer types */ OPENVG_IMAGE /* QueryContext targets */ CONTEXT_CLIENT_TYPE /* CreateContext attributes */ CONTEXT_CLIENT_VERSION MULTISAMPLE_RESOLVE /* Multisample resolution behaviors */ MULTISAMPLE_RESOLVE_DEFAULT MULTISAMPLE_RESOLVE_BOX /* BindAPI & QueryAPI targets */ OPENGL_ES_API OPENVG_API OPENGL_API )
View Source
const ( COLORSPACE = VG_COLORSPACE ALPHA_FORMAT = VG_ALPHA_FORMAT COLORSPACE_sRGB = VG_COLORSPACE_sRGB COLORSPACE_LINEAR = VG_COLORSPACE_LINEAR ALPHA_FORMAT_NONPRE = VG_ALPHA_FORMAT_NONPRE ALPHA_FORMAT_PRE = VG_ALPHA_FORMAT_PRE )
EGL 1.2 tokens renamed for consistency in EGL 1.3
View Source
const ( CONTEXT_MAJOR_VERSION = 0x3098 CONTEXT_MINOR_VERSION = 0x30fb )
Variables ¶
View Source
var ( DEFAULT_DISPLAY NativeDisplay NO_CONTEXT Context NO_DISPLAY Display NO_SURFACE Surface )
View Source
var Version struct{ Maj, Min EGLint }
Functions ¶
func CopyBuffers ¶
func CopyBuffers(d Display, s Surface, target NativePixmap) bool
func DestroyContext ¶
func DestroySurface ¶
func GetConfigs ¶
func Initialize ¶
func QueryString ¶
func ReleaseThread ¶
func ReleaseThread() bool
func SwapBuffers ¶
func SwapInterval ¶
func WaitClient ¶
func WaitClient() bool
func WaitNative ¶
Types ¶
type ClientBuffer ¶
type Display ¶
func GetCurrentDisplay ¶
func GetCurrentDisplay() Display
func GetDisplay ¶
func GetDisplay(d NativeDisplay) Display
type EGLContext ¶
type EGLContext struct {
// contains filtered or unexported fields
}
func CreateEGLContext ¶
func CreateEGLContext(native NativeObj) *EGLContext
func CreateEGLContextEx ¶
func CreateEGLContextEx(native NativeObj, depthSize, esVersion int) *EGLContext
func NewContext ¶
func NewContext(window NativeWindow, ndisplay NativeDisplay) *EGLContext
depthSize : 16, 24 * esVersion : 2 (es2), 3 (es3)
func NewContextEx ¶
func NewContextEx(window NativeWindow, ndisplay NativeDisplay, depthSize, esVersion, minor int) *EGLContext
func (*EGLContext) GetFormat ¶
func (ctx *EGLContext) GetFormat() int
func (*EGLContext) InitEGLContext ¶
func (ctx *EGLContext) InitEGLContext() bool
func (*EGLContext) InitEGLSurface ¶
func (ctx *EGLContext) InitEGLSurface() bool
func (*EGLContext) InitEGLSurfaceX ¶
func (ctx *EGLContext) InitEGLSurfaceX() bool
func (*EGLContext) IsReady ¶
func (ctx *EGLContext) IsReady() bool
func (*EGLContext) ReinitEGLContext ¶
func (ctx *EGLContext) ReinitEGLContext() bool
func (*EGLContext) Resume ¶
func (ctx *EGLContext) Resume() bool
func (*EGLContext) Suspend ¶
func (ctx *EGLContext) Suspend()
func (*EGLContext) SwapBuffers ¶
func (ctx *EGLContext) SwapBuffers() bool
func (*EGLContext) Terminate ¶
func (ctx *EGLContext) Terminate()
type NativeDisplay ¶
type NativePixmap ¶
type NativeWindow ¶
type Surface ¶
func CreatePbufferSurface ¶
func CreatePixmapSurface ¶
func CreatePixmapSurface(d Display, conf Config, pixmap NativePixmap, attribs []EGLint) Surface
func CreateWindowSurface ¶
func CreateWindowSurface(d Display, conf Config, win NativeWindow, attribs []EGLint) Surface
func GetCurrentSurface ¶
Click to show internal directories.
Click to hide internal directories.