egl

package
Version: v0.0.0-...-71b5052 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2014 License: MIT Imports: 2 Imported by: 2

Documentation

Index

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 BindAPI

func BindAPI(api uint) bool

func BindTexImage

func BindTexImage(d Display, s Surface, buf int) bool

func ChooseConfig

func ChooseConfig(d Display, atrribs []int, confs []Config, confSz int, nConf []int) bool

func CopyBuffers

func CopyBuffers(d Display, s Surface, target NativePixmap) bool

func DestroyContext

func DestroyContext(d Display, c Context) bool

func DestroySurface

func DestroySurface(d Display, s Surface) bool

func GetConfigAttrib

func GetConfigAttrib(d Display, conf Config, attr int, val []int) bool

func GetConfigs

func GetConfigs(d Display, confs []Config, confSz int, nConf []int) bool

func GetError

func GetError() error

func Initialize

func Initialize(d Display) bool

func MakeCurrent

func MakeCurrent(d Display, draw Surface, read Surface, c Context) bool

func QueryAPI

func QueryAPI() uint

func QueryContext

func QueryContext(d Display, c Context, attr int, val []int) bool

func QueryString

func QueryString(d Display, name int) string

func QuerySurface

func QuerySurface(d Display, val []int, attr int, s Surface) bool

func ReleaseTexImage

func ReleaseTexImage(d Display, s Surface, buf int) bool

func ReleaseThread

func ReleaseThread() bool

func SurfaceAttrib

func SurfaceAttrib(d Display, s Surface, attr int, val int) bool

func SwapBuffers

func SwapBuffers(d Display, s Surface) bool

func SwapInterval

func SwapInterval(d Display, inv int) bool

func Terminate

func Terminate(d Display) bool

func WaitClient

func WaitClient() bool

func WaitGL

func WaitGL() bool

func WaitNative

func WaitNative(engine int) bool

Types

type ClientBuffer

type ClientBuffer unsafe.Pointer

type Config

type Config unsafe.Pointer

type Context

type Context unsafe.Pointer

func CreateContext

func CreateContext(d Display, conf Config, shared Context, attribs []int) Context

type Display

type Display unsafe.Pointer

func GetCurrentDisplay

func GetCurrentDisplay() Display

func GetDisplay

func GetDisplay(d NativeDisplay) Display

type Error

type Error int
const (
	SUCCESS Error = 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

func (Error) Error

func (e Error) Error() string

type NativeDisplay

type NativeDisplay unsafe.Pointer

type NativePixmap

type NativePixmap unsafe.Pointer

type NativeWindow

type NativeWindow unsafe.Pointer

type Surface

type Surface unsafe.Pointer

func CreatePbufferFromClientBuffer

func CreatePbufferFromClientBuffer(
	d Display, buftyp uint, conf Config, buf ClientBuffer, attribs []int) Surface

func CreatePbufferSurface

func CreatePbufferSurface(d Display, conf Config, attribs []int) Surface

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

func GetCurrentSurface(readdraw int) Surface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL