Documentation ¶
Index ¶
- Constants
- Variables
- func BindAPI(api uint) bool
- func BindTexImage(d Display, s Surface, buf int) bool
- func ChooseConfig(d Display, atrribs []int, confs []Config, confSz int, nConf []int) bool
- 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, val []int) bool
- func GetConfigs(d Display, confs []Config, confSz int, nConf []int) bool
- func GetError() error
- 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 []int) bool
- func QueryString(d Display, name int) string
- func QuerySurface(d Display, val []int, attr int, s Surface) bool
- 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 Error
- type NativeDisplay
- type NativePixmap
- type NativeWindow
- type Surface
- func CreatePbufferFromClientBuffer(d Display, buftyp uint, conf Config, buf ClientBuffer, attribs []int) Surface
- func CreatePbufferSurface(d Display, conf Config, attribs []int) Surface
- func CreatePixmapSurface(d Display, conf Config, pixmap NativePixmap, attribs []int) Surface
- func CreateWindowSurface(d Display, conf Config, win NativeWindow, attribs []int) Surface
- func GetCurrentSurface(readdraw int) Surface
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 ( 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 OPENGL_ES2_BIT OPENGL_BIT )
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
Variables ¶
View Source
var ( DEFAULT_DISPLAY NativeDisplay NO_CONTEXT Context NO_DISPLAY Display NO_SURFACE Surface )
View Source
var Version struct{ Maj, Min int }
Functions ¶
func ChooseConfig ¶
func CopyBuffers ¶
func CopyBuffers(d Display, s Surface, target NativePixmap) bool
func DestroyContext ¶
func DestroySurface ¶
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 Error ¶
type Error int
type NativeDisplay ¶
type NativePixmap ¶
type NativeWindow ¶
type Surface ¶
func CreatePbufferSurface ¶
func CreatePixmapSurface ¶
func CreatePixmapSurface(d Display, conf Config, pixmap NativePixmap, attribs []int) Surface
func CreateWindowSurface ¶
func CreateWindowSurface(d Display, conf Config, win NativeWindow, attribs []int) Surface
func GetCurrentSurface ¶
Click to show internal directories.
Click to hide internal directories.