egles: github.com/mortdeus/egles/egl Index | Files | Directories

package egl

import "github.com/mortdeus/egles/egl"

Index

Package Files

consts.go egl.go types.go

Constants

const (
    VERSION_1_0 = 1
    VERSION_1_1 = 1
    VERSION_1_2 = 1
    VERSION_1_3 = 1
    VERSION_1_4 = 1
)

EGL Versioning

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

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

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

const (
    OPENGL_ES_BIT = 0x0001 << iota
    OPENVG_BIT
    OPENGL_ES2_BIT
    OPENGL_BIT
)

RENDERABLE_TYPE mask bits

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
)
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
)
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

var (
    DEFAULT_DISPLAY NativeDisplay
    NO_CONTEXT      Context
    NO_DISPLAY      Display
    NO_SURFACE      Surface
)
var Version struct{ Maj, Min int }

func BindAPI Uses

func BindAPI(api uint) bool

func BindTexImage Uses

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

func ChooseConfig Uses

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

func CopyBuffers Uses

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

func DestroyContext Uses

func DestroyContext(d Display, c Context) bool

func DestroySurface Uses

func DestroySurface(d Display, s Surface) bool

func GetConfigAttrib Uses

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

func GetConfigs Uses

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

func GetError Uses

func GetError() error

func Initialize Uses

func Initialize(d Display) bool

func MakeCurrent Uses

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

func QueryAPI Uses

func QueryAPI() uint

func QueryContext Uses

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

func QueryString Uses

func QueryString(d Display, name int) string

func QuerySurface Uses

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

func ReleaseTexImage Uses

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

func ReleaseThread Uses

func ReleaseThread() bool

func SurfaceAttrib Uses

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

func SwapBuffers Uses

func SwapBuffers(d Display, s Surface) bool

func SwapInterval Uses

func SwapInterval(d Display, inv int) bool

func Terminate Uses

func Terminate(d Display) bool

func WaitClient Uses

func WaitClient() bool

func WaitGL Uses

func WaitGL() bool

func WaitNative Uses

func WaitNative(engine int) bool

type ClientBuffer Uses

type ClientBuffer unsafe.Pointer

type Config Uses

type Config unsafe.Pointer

type Context Uses

type Context unsafe.Pointer

func CreateContext Uses

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

type Display Uses

type Display unsafe.Pointer

func GetCurrentDisplay Uses

func GetCurrentDisplay() Display

func GetDisplay Uses

func GetDisplay(d NativeDisplay) Display

type Error Uses

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 Uses

func (e Error) Error() string

type NativeDisplay Uses

type NativeDisplay unsafe.Pointer

type NativePixmap Uses

type NativePixmap unsafe.Pointer

type NativeWindow Uses

type NativeWindow unsafe.Pointer

type Surface Uses

type Surface unsafe.Pointer

func CreatePbufferFromClientBuffer Uses

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

func CreatePbufferSurface Uses

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

func CreatePixmapSurface Uses

func CreatePixmapSurface(d Display, conf Config, pixmap NativePixmap, attribs []int) Surface

func CreateWindowSurface Uses

func CreateWindowSurface(d Display, conf Config, win NativeWindow, attribs []int) Surface

func GetCurrentSurface Uses

func GetCurrentSurface(readdraw int) Surface

Directories

PathSynopsis
platform
platform/xorg

Package egl imports 2 packages (graph) and is imported by 2 packages. Updated 2016-07-17. Refresh now. Tools for package owners.