surfacetexture

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package surfacetexture provides Go bindings for Android SurfaceTexture.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error int32

Error represents an NDK error code.

func (Error) Error

func (e Error) Error() string

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 (*NativeWindow) Pointer

func (h *NativeWindow) Pointer() unsafe.Pointer

Pointer returns the underlying pointer as unsafe.Pointer.

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 (*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) UpdateTexImage

func (h *SurfaceTexture) UpdateTexImage() error

UpdateTexImage calls the underlying NDK function.

Jump to

Keyboard shortcuts

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