utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr

func Ptr(data interface{}) unsafe.Pointer

Ptr takes a slice or pointer (to a singular scalar value or the first element of an array or slice) and returns its GL-compatible address.

For example:

var data []uint8
...
gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0]))

func SliceToPtr

func SliceToPtr[T any](slice []T) *T

SliceToPtr takes a slice and returns its C-compatible pointer.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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