glkit

package
v0.6.18 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package glkit provides Go bindings for the GLKit framework.

Speed up OpenGL ES or OpenGL app development. Use math libraries, background texture loading, pre-created shader effects, and a standard view and view controller to implement your rendering loop.

The GLKit framework provides functions and classes that reduce the effort required to create new shader-based apps or to port existing apps that rely on fixed-function vertex or fragment processing provided by earlier versions of OpenGL ES or OpenGL.

Shader-Based Rendering Effects

  • GLKNamedEffect: A standard interface for objects that provide shader-based OpenGL rendering effects.

Rendering Effect Parameters

Math Utilties

Code generated from Apple documentation. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GLKTextureLoaderApplyPremultiplication is whether image data should be premultiplied before being loaded into the sharegroup.
	//
	// Deprecated: Deprecated.
	//
	// See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderApplyPremultiplication
	GLKTextureLoaderApplyPremultiplication string
	// GLKTextureLoaderGenerateMipmaps is whether or not to create mipmaps for a texture.
	//
	// Deprecated: Deprecated.
	//
	// See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderGenerateMipmaps
	GLKTextureLoaderGenerateMipmaps string
	// GLKTextureLoaderGrayscaleAsAlpha is whether or not to treat greyscale image data as alpha information.
	//
	// See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderGrayscaleAsAlpha
	GLKTextureLoaderGrayscaleAsAlpha string
	// GLKTextureLoaderOriginBottomLeft is whether or not to vertically flip image data to match OpenGL’s coordinate system.
	//
	// Deprecated: Deprecated.
	//
	// See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderOriginBottomLeft
	GLKTextureLoaderOriginBottomLeft string
)

Functions

func GLKMatrixStackGetTypeID

func GLKMatrixStackGetTypeID() uint

GLKMatrixStackGetTypeID returns the Core Foundation type for a matrix stack.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetTypeID()

func GLKMatrixStackLoadMatrix4

func GLKMatrixStackLoadMatrix4(stack GLKMatrixStackRef, matrix GLKMatrix4)

GLKMatrixStackLoadMatrix4 replaces the contents of the top matrix with a new matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackLoadMatrix4(_:_:)

func GLKMatrixStackMultiplyMatrix4

func GLKMatrixStackMultiplyMatrix4(stack GLKMatrixStackRef, matrix GLKMatrix4)

GLKMatrixStackMultiplyMatrix4 replaces the contents of the top matrix with a matrix calculated by multiplying the contents of the top matrix by another matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackMultiplyMatrix4(_:_:)

func GLKMatrixStackMultiplyMatrixStack

func GLKMatrixStackMultiplyMatrixStack(stackLeft GLKMatrixStackRef, stackRight GLKMatrixStackRef)

GLKMatrixStackMultiplyMatrixStack replaces the contents of the top matrix with a matrix calculated by multiplying the contents of the top matrix by the top matrix of another matrix stack.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackMultiplyMatrixStack(_:_:)

func GLKMatrixStackPop

func GLKMatrixStackPop(stack GLKMatrixStackRef)

GLKMatrixStackPop removes the topmost entry from the stack.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackPop(_:)

func GLKMatrixStackPush

func GLKMatrixStackPush(stack GLKMatrixStackRef)

GLKMatrixStackPush push a copy of the topmost matrix onto the top of the stack.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackPush(_:)

func GLKMatrixStackRotate

func GLKMatrixStackRotate(stack GLKMatrixStackRef, radians float32, x float32, y float32, z float32)

GLKMatrixStackRotate replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a rotation around an arbitrary axis.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackRotate(_:_:_:_:_:)

func GLKMatrixStackRotateWithVector3

func GLKMatrixStackRotateWithVector3(stack GLKMatrixStackRef, radians float32, axisVector GLKVector3)

GLKMatrixStackRotateWithVector3 replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a rotation around an arbitrary axis.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackRotateWithVector3(_:_:_:)

func GLKMatrixStackRotateWithVector4

func GLKMatrixStackRotateWithVector4(stack GLKMatrixStackRef, radians float32, axisVector GLKVector4)

GLKMatrixStackRotateWithVector4 replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a rotation around an arbitrary axis.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackRotateWithVector4(_:_:_:)

func GLKMatrixStackRotateX

func GLKMatrixStackRotateX(stack GLKMatrixStackRef, radians float32)

GLKMatrixStackRotateX replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a rotation around the positive-x axis.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackRotateX(_:_:)

func GLKMatrixStackRotateY

func GLKMatrixStackRotateY(stack GLKMatrixStackRef, radians float32)

GLKMatrixStackRotateY replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a rotation around the positive-y axis.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackRotateY(_:_:)

func GLKMatrixStackRotateZ

func GLKMatrixStackRotateZ(stack GLKMatrixStackRef, radians float32)

GLKMatrixStackRotateZ replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a rotation around the positive-z axis.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackRotateZ(_:_:)

func GLKMatrixStackScale

func GLKMatrixStackScale(stack GLKMatrixStackRef, sx float32, sy float32, sz float32)

GLKMatrixStackScale replaces the contents of the top matrix with a matrix calculated by scaling the contents of the top matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackScale(_:_:_:_:)

func GLKMatrixStackScaleWithVector3

func GLKMatrixStackScaleWithVector3(stack GLKMatrixStackRef, scaleVector GLKVector3)

GLKMatrixStackScaleWithVector3 replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a scaling operation.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackScaleWithVector3(_:_:)

func GLKMatrixStackScaleWithVector4

func GLKMatrixStackScaleWithVector4(stack GLKMatrixStackRef, scaleVector GLKVector4)

GLKMatrixStackScaleWithVector4 replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a scaling operation defined by a vector.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackScaleWithVector4(_:_:)

func GLKMatrixStackSize

func GLKMatrixStackSize(stack GLKMatrixStackRef) int32

GLKMatrixStackSize returns the number of matrices present on the matrix stack.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackSize(_:)

func GLKMatrixStackTranslate

func GLKMatrixStackTranslate(stack GLKMatrixStackRef, tx float32, ty float32, tz float32)

GLKMatrixStackTranslate replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a translation operation.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackTranslate(_:_:_:_:)

func GLKMatrixStackTranslateWithVector3

func GLKMatrixStackTranslateWithVector3(stack GLKMatrixStackRef, translationVector GLKVector3)

GLKMatrixStackTranslateWithVector3 replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a translation defined by a vector.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackTranslateWithVector3(_:_:)

func GLKMatrixStackTranslateWithVector4

func GLKMatrixStackTranslateWithVector4(stack GLKMatrixStackRef, translationVector GLKVector4)

GLKMatrixStackTranslateWithVector4 replaces the contents of the top matrix with a matrix calculated by composing the top matrix with a translation defined by a vector.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackTranslateWithVector4(_:_:)

func GLKQuaternionAngle

func GLKQuaternionAngle(quaternion GLKQuaternion) float32

GLKQuaternionAngle returns the rotation angle of a quaternion.

See: https://developer.apple.com/documentation/GLKit/GLKQuaternionAngle(_:)

func GLKQuaternionRotateVector3Array

func GLKQuaternionRotateVector3Array(quaternion GLKQuaternion, vectors *GLKVector3, vectorCount uintptr)

GLKQuaternionRotateVector3Array applies a quaternion rotation to an array of vectors.

See: https://developer.apple.com/documentation/GLKit/GLKQuaternionRotateVector3Array(_:_:_:)

func GLKQuaternionRotateVector4Array

func GLKQuaternionRotateVector4Array(quaternion GLKQuaternion, vectors *GLKVector4, vectorCount uintptr)

GLKQuaternionRotateVector4Array applies a quaternion rotation to an array of vectors.

See: https://developer.apple.com/documentation/GLKit/GLKQuaternionRotateVector4Array(_:_:_:)

func NSStringFromGLKMatrix2

func NSStringFromGLKMatrix2(matrix GLKMatrix2) *foundation.NSString

NSStringFromGLKMatrix2 returns a string that represents the contents of a matrix.

See: https://developer.apple.com/documentation/GLKit/NSStringFromGLKMatrix2(_:)

func NSStringFromGLKMatrix3

func NSStringFromGLKMatrix3(matrix GLKMatrix3) *foundation.NSString

NSStringFromGLKMatrix3 returns a string that represents the contents of a matrix.

See: https://developer.apple.com/documentation/GLKit/NSStringFromGLKMatrix3(_:)

func NSStringFromGLKMatrix4

func NSStringFromGLKMatrix4(matrix GLKMatrix4) *foundation.NSString

NSStringFromGLKMatrix4 returns a string that represents the contents of a matrix.

See: https://developer.apple.com/documentation/GLKit/NSStringFromGLKMatrix4(_:)

func NSStringFromGLKQuaternion

func NSStringFromGLKQuaternion(quaternion GLKQuaternion) *foundation.NSString

NSStringFromGLKQuaternion returns a string that represents the contents of a quaternion.

See: https://developer.apple.com/documentation/GLKit/NSStringFromGLKQuaternion(_:)

func NSStringFromGLKVector2

func NSStringFromGLKVector2(vector GLKVector2) *foundation.NSString

NSStringFromGLKVector2 returns a string that represents the contents of a vector.

See: https://developer.apple.com/documentation/GLKit/NSStringFromGLKVector2(_:)

func NSStringFromGLKVector3

func NSStringFromGLKVector3(vector GLKVector3) *foundation.NSString

NSStringFromGLKVector3 returns a string that represents the contents of a vector.

See: https://developer.apple.com/documentation/GLKit/NSStringFromGLKVector3(_:)

func NSStringFromGLKVector4

func NSStringFromGLKVector4(vector GLKVector4) *foundation.NSString

NSStringFromGLKVector4 returns a string that represents the contents of a vector.

See: https://developer.apple.com/documentation/GLKit/NSStringFromGLKVector4(_:)

func NewGLKTextureLoaderCallbackBlock

func NewGLKTextureLoaderCallbackBlock(handler GLKTextureLoaderCallback) (objc.ID, func())

NewGLKTextureLoaderCallbackBlock wraps a Go GLKTextureLoaderCallback as an Objective-C block. The caller must defer the returned cleanup function.

Types

type GLKFogMode

type GLKFogMode int32

See: https://developer.apple.com/documentation/GLKit/GLKFogMode

const (
	// GLKFogModeExp: The fog component is calculated as  and clamped to the range .
	GLKFogModeExp GLKFogMode = 0
	// GLKFogModeExp2: The fog component is calculated as  and clamped to the range .
	GLKFogModeExp2 GLKFogMode = 1
	// GLKFogModeLinear: The fog component is calculated as  and clamped to the range .
	GLKFogModeLinear GLKFogMode = 2
)

func (GLKFogMode) String

func (e GLKFogMode) String() string

type GLKLightingType

type GLKLightingType int32

See: https://developer.apple.com/documentation/GLKit/GLKLightingType

const (
	// GLKLightingTypePerPixel: Indicates that the inputs to the lighting calculation are interpolated across a triangle and the lighting calculations are performed at each fragment.
	GLKLightingTypePerPixel GLKLightingType = 1
	// GLKLightingTypePerVertex: Indicates that the lighting calculations are performed at each vertex in a triangle and then interpolated across the triangle.
	GLKLightingTypePerVertex GLKLightingType = 0
)

func (GLKLightingType) String

func (e GLKLightingType) String() string

type GLKMatrix2

type GLKMatrix2 [4]uint32

GLKMatrix2 is a `2x2` matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrix2 GLKMatrix2 is opaque storage with the size and alignment C gives GLKMatrix2: 16 bytes. C declares a record here, not a handle, so a pointer-width rendering would hand the framework eight bytes to write 16 into.

func GLKMatrixStackGetMatrix2

func GLKMatrixStackGetMatrix2(stack GLKMatrixStackRef) GLKMatrix2

GLKMatrixStackGetMatrix2 returns the top-left `2x2` corner of the top matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix2(_:)

type GLKMatrix3

type GLKMatrix3 [9]uint32

GLKMatrix3 is a `3x3` matrix stored in column-major order.

See: https://developer.apple.com/documentation/GLKit/GLKMatrix3 GLKMatrix3 is opaque storage with the size and alignment C gives GLKMatrix3: 36 bytes. C declares a record here, not a handle, so a pointer-width rendering would hand the framework eight bytes to write 36 into.

var (
	// GLKMatrix3Identity is a `3x3` identity matrix.
	//
	// See: https://developer.apple.com/documentation/GLKit/GLKMatrix3Identity
	GLKMatrix3Identity GLKMatrix3
)

func GLKMatrix3Invert

func GLKMatrix3Invert(matrix GLKMatrix3, isInvertible *bool) GLKMatrix3

GLKMatrix3Invert returns the inverse of a matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrix3Invert(_:_:)

func GLKMatrix3InvertAndTranspose

func GLKMatrix3InvertAndTranspose(matrix GLKMatrix3, isInvertible *bool) GLKMatrix3

GLKMatrix3InvertAndTranspose returns the inverse transpose of a matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrix3InvertAndTranspose(_:_:)

func GLKMatrixStackGetMatrix3

func GLKMatrixStackGetMatrix3(stack GLKMatrixStackRef) GLKMatrix3

GLKMatrixStackGetMatrix3 returns the top-left `3x3` corner of the top matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix3(_:)

func GLKMatrixStackGetMatrix3Inverse

func GLKMatrixStackGetMatrix3Inverse(stack GLKMatrixStackRef) GLKMatrix3

GLKMatrixStackGetMatrix3Inverse fetches the top-left `3x3` corner of the top matrix and returns its inverse.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix3Inverse(_:)

func GLKMatrixStackGetMatrix3InverseTranspose

func GLKMatrixStackGetMatrix3InverseTranspose(stack GLKMatrixStackRef) GLKMatrix3

GLKMatrixStackGetMatrix3InverseTranspose fetches the top-left `3x3` corner of the top matrix and returns its inverse transpose.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix3InverseTranspose(_:)

type GLKMatrix4

type GLKMatrix4 unsafe.Pointer

GLKMatrix4 is a `4x4` matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrix4 GLKMatrix4 is an unresolved C aggregate typedef.

var (
	// GLKMatrix4Identity is a `4x4` identity matrix.
	//
	// See: https://developer.apple.com/documentation/GLKit/GLKMatrix4Identity
	GLKMatrix4Identity GLKMatrix4
)

func GLKMatrix4Invert

func GLKMatrix4Invert(matrix GLKMatrix4, isInvertible *bool) GLKMatrix4

GLKMatrix4Invert returns the inverse of a matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrix4Invert(_:_:)

func GLKMatrix4InvertAndTranspose

func GLKMatrix4InvertAndTranspose(matrix GLKMatrix4, isInvertible *bool) GLKMatrix4

GLKMatrix4InvertAndTranspose returns the inverse transpose of a matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrix4InvertAndTranspose(_:_:)

func GLKMatrixStackGetMatrix4

func GLKMatrixStackGetMatrix4(stack GLKMatrixStackRef) GLKMatrix4

GLKMatrixStackGetMatrix4 returns a copy of the top matrix on the stack.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix4(_:)

func GLKMatrixStackGetMatrix4Inverse

func GLKMatrixStackGetMatrix4Inverse(stack GLKMatrixStackRef) GLKMatrix4

GLKMatrixStackGetMatrix4Inverse returns the inverse of the top matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix4Inverse(_:)

func GLKMatrixStackGetMatrix4InverseTranspose

func GLKMatrixStackGetMatrix4InverseTranspose(stack GLKMatrixStackRef) GLKMatrix4

GLKMatrixStackGetMatrix4InverseTranspose returns the inverse transpose of the top matrix.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix4InverseTranspose(_:)

type GLKMatrixStackRef

type GLKMatrixStackRef uintptr

GLKMatrixStackRef is an opaque type that represents a stack of 4 x 4 matrices, providing support for hierarchical transform modeling and similar tasks.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStack

func GLKMatrixStackCreate

func GLKMatrixStackCreate(alloc corefoundation.CFAllocatorRef) GLKMatrixStackRef

GLKMatrixStackCreate allocates and returns a new matrix stack.

See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackCreate(_:)

type GLKNamedEffect

type GLKNamedEffect interface {
	objectivec.IObject

	// Prepares an effect for OpenGL ES rendering.
	//
	// See: https://developer.apple.com/documentation/GLKit/GLKNamedEffect/prepareToDraw()
	PrepareToDraw()
}

A standard interface for objects that provide shader-based OpenGL rendering effects.

See: https://developer.apple.com/documentation/GLKit/GLKNamedEffect

type GLKNamedEffectObject

type GLKNamedEffectObject struct {
	objectivec.Object
}

GLKNamedEffectObject wraps an existing Objective-C object that conforms to the GLKNamedEffect protocol.

func GLKNamedEffectObjectFromID

func GLKNamedEffectObjectFromID(id objc.ID) GLKNamedEffectObject

GLKNamedEffectObjectFromID constructs a GLKNamedEffectObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (GLKNamedEffectObject) BaseObject

func (o GLKNamedEffectObject) BaseObject() objectivec.Object

func (GLKNamedEffectObject) PrepareToDraw

func (o GLKNamedEffectObject) PrepareToDraw()

Prepares an effect for OpenGL ES rendering.

Discussion

An effect binds a compiled shader program to the context and returns. Many effects also bind data to other OpenGL state variables—see the appropriate reference for each effect class.

See: https://developer.apple.com/documentation/GLKit/GLKNamedEffect/prepareToDraw()

type GLKQuaternion

type GLKQuaternion unsafe.Pointer

GLKQuaternion is a representation of a quaternion.

See: https://developer.apple.com/documentation/GLKit/GLKQuaternion GLKQuaternion is an unresolved C aggregate typedef.

var (
	// GLKQuaternionIdentity is an identity quaternion.
	//
	// See: https://developer.apple.com/documentation/GLKit/GLKQuaternionIdentity
	GLKQuaternionIdentity GLKQuaternion
)

func GLKQuaternionMakeWithMatrix3

func GLKQuaternionMakeWithMatrix3(matrix GLKMatrix3) GLKQuaternion

GLKQuaternionMakeWithMatrix3 creates a quaternion from a rotation matrix.

See: https://developer.apple.com/documentation/GLKit/GLKQuaternionMakeWithMatrix3(_:)

func GLKQuaternionMakeWithMatrix4

func GLKQuaternionMakeWithMatrix4(matrix GLKMatrix4) GLKQuaternion

GLKQuaternionMakeWithMatrix4 creates a quaternion from a rotation matrix.

See: https://developer.apple.com/documentation/GLKit/GLKQuaternionMakeWithMatrix4(_:)

func GLKQuaternionSlerp

func GLKQuaternionSlerp(quaternionStart GLKQuaternion, quaternionEnd GLKQuaternion, t float32) GLKQuaternion

GLKQuaternionSlerp returns the spherical linear interpolation of two quaternions.

See: https://developer.apple.com/documentation/GLKit/GLKQuaternionSlerp(_:_:_:)

type GLKTextureEnvMode

type GLKTextureEnvMode int32

See: https://developer.apple.com/documentation/GLKit/GLKTextureEnvMode

const (
	// GLKTextureEnvModeDecal: The output color is calculated by using the texture’s alpha component to blend the texture’s color with the input color.
	GLKTextureEnvModeDecal GLKTextureEnvMode = 2
	// GLKTextureEnvModeModulate: The output color is calculated by multiplying the texture’s color by the input color.
	GLKTextureEnvModeModulate GLKTextureEnvMode = 1
	// GLKTextureEnvModeReplace: The output color is set to the color fetched from the texture.
	GLKTextureEnvModeReplace GLKTextureEnvMode = 0
)

func (GLKTextureEnvMode) String

func (e GLKTextureEnvMode) String() string

type GLKTextureInfoAlphaState

type GLKTextureInfoAlphaState int32

See: https://developer.apple.com/documentation/GLKit/GLKTextureInfoAlphaState

const (
	// GLKTextureInfoAlphaStateNonPremultiplied: Indicates that the color values in the texture were not premultiplied by the alpha value.
	GLKTextureInfoAlphaStateNonPremultiplied GLKTextureInfoAlphaState = 1
	// GLKTextureInfoAlphaStateNone: Indicates that the texture has no alpha information.
	GLKTextureInfoAlphaStateNone GLKTextureInfoAlphaState = 0
	// GLKTextureInfoAlphaStatePremultiplied: Indicates that the color values in the texture have already been premultiplied by the alpha value.
	GLKTextureInfoAlphaStatePremultiplied GLKTextureInfoAlphaState = 2
)

func (GLKTextureInfoAlphaState) String

func (e GLKTextureInfoAlphaState) String() string

type GLKTextureInfoOrigin

type GLKTextureInfoOrigin int32

See: https://developer.apple.com/documentation/GLKit/GLKTextureInfoOrigin

const (
	// GLKTextureInfoOriginBottomLeft: The origin of the texture is in the bottom-left corner.
	GLKTextureInfoOriginBottomLeft GLKTextureInfoOrigin = 2
	// GLKTextureInfoOriginTopLeft: The origin of the texture is in the top-left corner.
	GLKTextureInfoOriginTopLeft GLKTextureInfoOrigin = 1
	// GLKTextureInfoOriginUnknown: The origin of the texture is not supported.
	GLKTextureInfoOriginUnknown GLKTextureInfoOrigin = 0
)

func (GLKTextureInfoOrigin) String

func (e GLKTextureInfoOrigin) String() string

type GLKTextureLoaderCallback

type GLKTextureLoaderCallback = func(*uintptr, foundation.NSError)

GLKTextureLoaderCallback is signature for the block executed after an asynchronous texture loading operation completes.

See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderCallback

type GLKTextureLoaderError

type GLKTextureLoaderError uint32

See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code

const (
	// GLKTextureLoaderErrorAlphaPremultiplicationFailure: The texture source data does not allow the alpha to be premultiplied.
	GLKTextureLoaderErrorAlphaPremultiplicationFailure GLKTextureLoaderError = 16
	// GLKTextureLoaderErrorCompressedTextureUpload: A compressed texture could not be uploaded.
	GLKTextureLoaderErrorCompressedTextureUpload GLKTextureLoaderError = 7
	// GLKTextureLoaderErrorCubeMapInvalidNumFiles: The incorrect number of files were specified for the cube map.
	GLKTextureLoaderErrorCubeMapInvalidNumFiles GLKTextureLoaderError = 6
	// GLKTextureLoaderErrorDataPreprocessingFailure: The data could not be preprocessed correctly.
	GLKTextureLoaderErrorDataPreprocessingFailure GLKTextureLoaderError = 12
	// GLKTextureLoaderErrorFileOrURLNotFound: A file could not be found at the path provided.
	GLKTextureLoaderErrorFileOrURLNotFound GLKTextureLoaderError = 0
	// GLKTextureLoaderErrorIncompatibleFormatSRGB: The decoded data was in an incompatible format for an sRGB texture.
	GLKTextureLoaderErrorIncompatibleFormatSRGB GLKTextureLoaderError = 18
	// GLKTextureLoaderErrorInvalidCGImage: The image provided was invalid.
	GLKTextureLoaderErrorInvalidCGImage GLKTextureLoaderError = 2
	// GLKTextureLoaderErrorInvalidEAGLContext: The EAGL context was not a valid context.
	GLKTextureLoaderErrorInvalidEAGLContext GLKTextureLoaderError = 17
	// GLKTextureLoaderErrorInvalidNSData: The data provided is not in a recognized image format.
	GLKTextureLoaderErrorInvalidNSData GLKTextureLoaderError = 1
	// GLKTextureLoaderErrorMipmapUnsupported: The texture source data does not allow mipmaps to be generated.
	GLKTextureLoaderErrorMipmapUnsupported GLKTextureLoaderError = 13
	// GLKTextureLoaderErrorPVRAtlasUnsupported: Cube maps may not be compressed in PVRTC format.
	GLKTextureLoaderErrorPVRAtlasUnsupported GLKTextureLoaderError = 5
	// GLKTextureLoaderErrorReorientationFailure: The texture source data does not allow the image to be reoriented.
	GLKTextureLoaderErrorReorientationFailure GLKTextureLoaderError = 15
	// GLKTextureLoaderErrorUncompressedTextureUpload: An uncompressed texture could not be uploaded.
	GLKTextureLoaderErrorUncompressedTextureUpload GLKTextureLoaderError = 8
	// GLKTextureLoaderErrorUnknownFileType: The file was in an unrecognized format.
	GLKTextureLoaderErrorUnknownFileType GLKTextureLoaderError = 4
	// GLKTextureLoaderErrorUnknownPathType: The path type was unrecognized.
	GLKTextureLoaderErrorUnknownPathType GLKTextureLoaderError = 3
	// GLKTextureLoaderErrorUnsupportedBitDepth: The data in the source image has an unsupported bit depth.
	GLKTextureLoaderErrorUnsupportedBitDepth GLKTextureLoaderError = 10
	// GLKTextureLoaderErrorUnsupportedCubeMapDimensions: The cube map’s dimensions are incorrect.
	GLKTextureLoaderErrorUnsupportedCubeMapDimensions GLKTextureLoaderError = 9
	// GLKTextureLoaderErrorUnsupportedOrientation: The texture source data is stored with an unsupported origin position.
	GLKTextureLoaderErrorUnsupportedOrientation GLKTextureLoaderError = 14
	// GLKTextureLoaderErrorUnsupportedPVRFormat: The data in the PVRTC compressed format is in an unsupported format.
	GLKTextureLoaderErrorUnsupportedPVRFormat     GLKTextureLoaderError = 11
	GLKTextureLoaderErrorUnsupportedTextureTarget GLKTextureLoaderError = 19
)

func (GLKTextureLoaderError) String

func (e GLKTextureLoaderError) String() string

type GLKTextureTarget

type GLKTextureTarget uint32

See: https://developer.apple.com/documentation/GLKit/GLKTextureTarget

const (
	// GLKTextureTarget2D: The texture is a 2D texture.
	GLKTextureTarget2D GLKTextureTarget = 0xde1
	// GLKTextureTargetCt: The number of items in the enumeration.
	GLKTextureTargetCt GLKTextureTarget = 2
	// GLKTextureTargetCubeMap: The texture is a set of six textures that make up a cube map.
	GLKTextureTargetCubeMap GLKTextureTarget = 0x8513
)

func (GLKTextureTarget) String

func (e GLKTextureTarget) String() string

type GLKVector2

type GLKVector2 [1]uint64

GLKVector2 is a representation of a 2-component vector.

See: https://developer.apple.com/documentation/GLKit/GLKVector2 GLKVector2 is opaque storage with the size and alignment C gives GLKVector2: 8 bytes. C declares a record here, not a handle, so a pointer-width rendering would hand the framework eight bytes to write 8 into.

type GLKVector3

type GLKVector3 [3]uint32

GLKVector3 is a representation of a 3-component vector.

See: https://developer.apple.com/documentation/GLKit/GLKVector3 GLKVector3 is opaque storage with the size and alignment C gives GLKVector3: 12 bytes. C declares a record here, not a handle, so a pointer-width rendering would hand the framework eight bytes to write 12 into.

func GLKMathProject

func GLKMathProject(object GLKVector3, model GLKMatrix4, projection GLKMatrix4, viewport *int32) GLKVector3

GLKMathProject projects a point in object space into the window coordinate system.

See: https://developer.apple.com/documentation/GLKit/GLKMathProject(_:_:_:_:)

func GLKMathUnproject

func GLKMathUnproject(window GLKVector3, model GLKMatrix4, projection GLKMatrix4, viewport *int32, success *bool) GLKVector3

GLKMathUnproject projects a point in view space into object space.

See: https://developer.apple.com/documentation/GLKit/GLKMathUnproject(_:_:_:_:_:)

func GLKQuaternionAxis

func GLKQuaternionAxis(quaternion GLKQuaternion) GLKVector3

GLKQuaternionAxis returns the axis of rotation of a quaternion.

See: https://developer.apple.com/documentation/GLKit/GLKQuaternionAxis(_:)

type GLKVector4

type GLKVector4 unsafe.Pointer

GLKVector4 is a representation of a 4-component vector.

See: https://developer.apple.com/documentation/GLKit/GLKVector4 GLKVector4 is an unresolved C aggregate typedef.

type GLKVertexAttrib

type GLKVertexAttrib int32

See: https://developer.apple.com/documentation/GLKit/GLKVertexAttrib

const (
	// GLKVertexAttribColor: This index is used to provide the vertex color to a shader.
	GLKVertexAttribColor GLKVertexAttrib = 2
	// GLKVertexAttribNormal: This index is used to provide the vertex normal to a shader.
	GLKVertexAttribNormal GLKVertexAttrib = 1
	// GLKVertexAttribPosition: This index is used to provide the vertex position to a shader.
	GLKVertexAttribPosition GLKVertexAttrib = 0
	// GLKVertexAttribTexCoord0: This index is used to provide a set of texture coordinates to a shader.
	GLKVertexAttribTexCoord0 GLKVertexAttrib = 3
	// GLKVertexAttribTexCoord1: This index is used to provide the second set of texture coordinates to a shader.
	GLKVertexAttribTexCoord1 GLKVertexAttrib = 4
)

func (GLKVertexAttrib) String

func (e GLKVertexAttrib) String() string

type GLKVertexAttributeParameters

type GLKVertexAttributeParameters [3]uint32

See: https://developer.apple.com/documentation/GLKit/GLKVertexAttributeParameters GLKVertexAttributeParameters is opaque storage with the size and alignment C gives GLKVertexAttributeParameters: 12 bytes. C declares a record here, not a handle, so a pointer-width rendering would hand the framework eight bytes to write 12 into.

func GLKVertexAttributeParametersFromModelIO

func GLKVertexAttributeParametersFromModelIO(vertexFormat uint) GLKVertexAttributeParameters

GLKVertexAttributeParametersFromModelIO.

See: https://developer.apple.com/documentation/GLKit/GLKVertexAttributeParametersFromModelIO(_:)

type GLKViewDrawableColorFormat

type GLKViewDrawableColorFormat int

See: https://developer.apple.com/documentation/GLKit/GLKViewDrawableColorFormat

const (
	// GLKViewDrawableColorFormatRGB565: An RGB565 format.
	GLKViewDrawableColorFormatRGB565 GLKViewDrawableColorFormat = 0
	// GLKViewDrawableColorFormatRGBA8888: An RGBA8888 format.
	GLKViewDrawableColorFormatRGBA8888 GLKViewDrawableColorFormat = 0
	// GLKViewDrawableColorFormatSRGBA8888: An sRGBA8888 format.
	GLKViewDrawableColorFormatSRGBA8888 GLKViewDrawableColorFormat = 0
)

func (GLKViewDrawableColorFormat) String

type GLKViewDrawableDepthFormat

type GLKViewDrawableDepthFormat int

See: https://developer.apple.com/documentation/GLKit/GLKViewDrawableDepthFormat

const (
	// GLKViewDrawableDepthFormat16: A 16-bit depth entry for each pixel.
	GLKViewDrawableDepthFormat16 GLKViewDrawableDepthFormat = 0
	// GLKViewDrawableDepthFormat24: A 24-bit depth entry for each pixel.
	GLKViewDrawableDepthFormat24 GLKViewDrawableDepthFormat = 0
	// GLKViewDrawableDepthFormatNone: The underlying framebuffer object has no depth buffer.
	GLKViewDrawableDepthFormatNone GLKViewDrawableDepthFormat = 0
)

func (GLKViewDrawableDepthFormat) String

type GLKViewDrawableMultisample

type GLKViewDrawableMultisample int

See: https://developer.apple.com/documentation/GLKit/GLKViewDrawableMultisample

const (
	// GLKViewDrawableMultisample4X: Multisampling is enabled.
	GLKViewDrawableMultisample4X GLKViewDrawableMultisample = 0
	// GLKViewDrawableMultisampleNone: Multisampling is not enabled.
	GLKViewDrawableMultisampleNone GLKViewDrawableMultisample = 0
)

func (GLKViewDrawableMultisample) String

type GLKViewDrawableStencilFormat

type GLKViewDrawableStencilFormat int

See: https://developer.apple.com/documentation/GLKit/GLKViewDrawableStencilFormat

const (
	// GLKViewDrawableStencilFormat8: An 8-bit stencil entry for each pixel.
	GLKViewDrawableStencilFormat8 GLKViewDrawableStencilFormat = 0
	// GLKViewDrawableStencilFormatNone: The underlying framebuffer object has no stencil buffer.
	GLKViewDrawableStencilFormatNone GLKViewDrawableStencilFormat = 0
)

func (GLKViewDrawableStencilFormat) String

Jump to

Keyboard shortcuts

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