Documentation
¶
Overview ¶
Package surfacetexture provides Go bindings for Android SurfaceTexture.
Index ¶
- type Error
- type NativeWindow
- type SurfaceTexture
- func (h *SurfaceTexture) AcquireWindow() *NativeWindow
- func (h *SurfaceTexture) AttachToGLContext(texName uint32) error
- func (h *SurfaceTexture) Close() error
- func (h *SurfaceTexture) DetachFromGLContext() error
- func (h *SurfaceTexture) Pointer() unsafe.Pointer
- func (h *SurfaceTexture) Timestamp() int64
- func (h *SurfaceTexture) TransformMatrix(mtx *[16]float32)
- func (h *SurfaceTexture) UintPtr() uintptr
- func (h *SurfaceTexture) UpdateTexImage() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NativeWindow ¶
type NativeWindow struct {
// contains filtered or unexported fields
}
NativeWindow wraps the NDK ANativeWindow handle.
func NewNativeWindowFromPointer ¶
func NewNativeWindowFromPointer(ptr unsafe.Pointer) *NativeWindow
NewNativeWindowFromPointer wraps a raw ANativeWindow pointer.
func NewNativeWindowFromUintPtr ¶ added in v0.0.4
func NewNativeWindowFromUintPtr(ptr uintptr) *NativeWindow
NewNativeWindowFromUintPtr wraps a uintptr as a NativeWindow. The caller must ensure ptr points to a valid ANativeWindow.
func (*NativeWindow) Pointer ¶
func (h *NativeWindow) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.
func (*NativeWindow) UintPtr ¶ added in v0.0.4
func (h *NativeWindow) UintPtr() uintptr
UintPtr returns the underlying pointer as a uintptr. This is useful for interop with gomobile bind, golang.org/x/mobile, gioui.org, and other packages that represent native handles as uintptr.
type SurfaceTexture ¶
type SurfaceTexture struct {
// contains filtered or unexported fields
}
SurfaceTexture wraps the NDK ASurfaceTexture handle.
func NewSurfaceTextureFromPointer ¶
func NewSurfaceTextureFromPointer(ptr unsafe.Pointer) *SurfaceTexture
NewSurfaceTextureFromPointer wraps a raw ASurfaceTexture pointer.
func NewSurfaceTextureFromUintPtr ¶ added in v0.0.4
func NewSurfaceTextureFromUintPtr(ptr uintptr) *SurfaceTexture
NewSurfaceTextureFromUintPtr wraps a uintptr as a SurfaceTexture. The caller must ensure ptr points to a valid ASurfaceTexture.
func (*SurfaceTexture) AcquireWindow ¶
func (h *SurfaceTexture) AcquireWindow() *NativeWindow
AcquireWindow creates a new NativeWindow from this SurfaceTexture.
func (*SurfaceTexture) AttachToGLContext ¶
func (h *SurfaceTexture) AttachToGLContext(texName uint32) error
AttachToGLContext calls the underlying NDK function.
func (*SurfaceTexture) Close ¶
func (h *SurfaceTexture) Close() error
Close releases the underlying NDK handle.
func (*SurfaceTexture) DetachFromGLContext ¶
func (h *SurfaceTexture) DetachFromGLContext() error
DetachFromGLContext calls the underlying NDK function.
func (*SurfaceTexture) Pointer ¶
func (h *SurfaceTexture) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.
func (*SurfaceTexture) Timestamp ¶
func (h *SurfaceTexture) Timestamp() int64
Timestamp returns the value directly.
func (*SurfaceTexture) TransformMatrix ¶
func (h *SurfaceTexture) TransformMatrix(mtx *[16]float32)
TransformMatrix calls the underlying NDK function.
func (*SurfaceTexture) UintPtr ¶ added in v0.0.4
func (h *SurfaceTexture) UintPtr() uintptr
UintPtr returns the underlying pointer as a uintptr. This is useful for interop with gomobile bind, golang.org/x/mobile, gioui.org, and other packages that represent native handles as uintptr.
func (*SurfaceTexture) UpdateTexImage ¶
func (h *SurfaceTexture) UpdateTexImage() error
UpdateTexImage calls the underlying NDK function.