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 ¶
- GLKMatrixStackRef: An opaque type that represents a stack of 4 x 4 matrices, providing support for hierarchical transform modeling and similar tasks.
- GLKMatrix3 (GLKMatrix2, GLKMatrix3)
- GLKMatrix4 (GLKMatrix4)
- GLKVector2 (GLKVector2)
- GLKVector3 (GLKVector3)
- GLKVector4 (GLKVector4)
- GLKQuaternion (GLKQuaternion)
- GLKit Math Utilities//
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Variables
- func BindFunc(fptr any, name string) (err error)
- func GLKMatrixStackGetTypeID() uint
- func GLKMatrixStackLoadMatrix4(stack GLKMatrixStackRef, matrix GLKMatrix4)
- func GLKMatrixStackMultiplyMatrix4(stack GLKMatrixStackRef, matrix GLKMatrix4)
- func GLKMatrixStackMultiplyMatrixStack(stackLeft GLKMatrixStackRef, stackRight GLKMatrixStackRef)
- func GLKMatrixStackPop(stack GLKMatrixStackRef)
- func GLKMatrixStackPush(stack GLKMatrixStackRef)
- func GLKMatrixStackRotate(stack GLKMatrixStackRef, radians float32, x float32, y float32, z float32)
- func GLKMatrixStackRotateWithVector3(stack GLKMatrixStackRef, radians float32, axisVector GLKVector3)
- func GLKMatrixStackRotateWithVector4(stack GLKMatrixStackRef, radians float32, axisVector GLKVector4)
- func GLKMatrixStackRotateX(stack GLKMatrixStackRef, radians float32)
- func GLKMatrixStackRotateY(stack GLKMatrixStackRef, radians float32)
- func GLKMatrixStackRotateZ(stack GLKMatrixStackRef, radians float32)
- func GLKMatrixStackScale(stack GLKMatrixStackRef, sx float32, sy float32, sz float32)
- func GLKMatrixStackScaleWithVector3(stack GLKMatrixStackRef, scaleVector GLKVector3)
- func GLKMatrixStackScaleWithVector4(stack GLKMatrixStackRef, scaleVector GLKVector4)
- func GLKMatrixStackSize(stack GLKMatrixStackRef) int32
- func GLKMatrixStackTranslate(stack GLKMatrixStackRef, tx float32, ty float32, tz float32)
- func GLKMatrixStackTranslateWithVector3(stack GLKMatrixStackRef, translationVector GLKVector3)
- func GLKMatrixStackTranslateWithVector4(stack GLKMatrixStackRef, translationVector GLKVector4)
- func GLKQuaternionAngle(quaternion GLKQuaternion) float32
- func GLKQuaternionRotateVector3Array(quaternion GLKQuaternion, vectors *GLKVector3, vectorCount uintptr)
- func GLKQuaternionRotateVector4Array(quaternion GLKQuaternion, vectors *GLKVector4, vectorCount uintptr)
- func NSStringFromGLKMatrix2(matrix GLKMatrix2) *foundation.NSString
- func NSStringFromGLKMatrix3(matrix GLKMatrix3) *foundation.NSString
- func NSStringFromGLKMatrix4(matrix GLKMatrix4) *foundation.NSString
- func NSStringFromGLKQuaternion(quaternion GLKQuaternion) *foundation.NSString
- func NSStringFromGLKVector2(vector GLKVector2) *foundation.NSString
- func NSStringFromGLKVector3(vector GLKVector3) *foundation.NSString
- func NSStringFromGLKVector4(vector GLKVector4) *foundation.NSString
- func NewGLKTextureInfoErrorBlock(handler GLKTextureInfoErrorHandler) (objc.ID, func())
- func NewGLKTextureLoaderCallbackBlock(handler GLKTextureLoaderCallback) (objc.ID, func())
- func SymbolAddress(name string) (uintptr, error)
- func TryGLKMatrixStackGetTypeID() (uint, error)
- func TryGLKMatrixStackLoadMatrix4(stack GLKMatrixStackRef, matrix GLKMatrix4) error
- func TryGLKMatrixStackMultiplyMatrix4(stack GLKMatrixStackRef, matrix GLKMatrix4) error
- func TryGLKMatrixStackMultiplyMatrixStack(stackLeft GLKMatrixStackRef, stackRight GLKMatrixStackRef) error
- func TryGLKMatrixStackPop(stack GLKMatrixStackRef) error
- func TryGLKMatrixStackPush(stack GLKMatrixStackRef) error
- func TryGLKMatrixStackRotate(stack GLKMatrixStackRef, radians float32, x float32, y float32, z float32) error
- func TryGLKMatrixStackRotateWithVector3(stack GLKMatrixStackRef, radians float32, axisVector GLKVector3) error
- func TryGLKMatrixStackRotateWithVector4(stack GLKMatrixStackRef, radians float32, axisVector GLKVector4) error
- func TryGLKMatrixStackRotateX(stack GLKMatrixStackRef, radians float32) error
- func TryGLKMatrixStackRotateY(stack GLKMatrixStackRef, radians float32) error
- func TryGLKMatrixStackRotateZ(stack GLKMatrixStackRef, radians float32) error
- func TryGLKMatrixStackScale(stack GLKMatrixStackRef, sx float32, sy float32, sz float32) error
- func TryGLKMatrixStackScaleWithVector3(stack GLKMatrixStackRef, scaleVector GLKVector3) error
- func TryGLKMatrixStackScaleWithVector4(stack GLKMatrixStackRef, scaleVector GLKVector4) error
- func TryGLKMatrixStackSize(stack GLKMatrixStackRef) (int32, error)
- func TryGLKMatrixStackTranslate(stack GLKMatrixStackRef, tx float32, ty float32, tz float32) error
- func TryGLKMatrixStackTranslateWithVector3(stack GLKMatrixStackRef, translationVector GLKVector3) error
- func TryGLKMatrixStackTranslateWithVector4(stack GLKMatrixStackRef, translationVector GLKVector4) error
- func TryGLKQuaternionAngle(quaternion GLKQuaternion) (float32, error)
- func TryGLKQuaternionRotateVector3Array(quaternion GLKQuaternion, vectors *GLKVector3, vectorCount uintptr) error
- func TryGLKQuaternionRotateVector4Array(quaternion GLKQuaternion, vectors *GLKVector4, vectorCount uintptr) error
- func TryNSStringFromGLKMatrix2(matrix GLKMatrix2) (*foundation.NSString, error)
- func TryNSStringFromGLKMatrix3(matrix GLKMatrix3) (*foundation.NSString, error)
- func TryNSStringFromGLKMatrix4(matrix GLKMatrix4) (*foundation.NSString, error)
- func TryNSStringFromGLKQuaternion(quaternion GLKQuaternion) (*foundation.NSString, error)
- func TryNSStringFromGLKVector2(vector GLKVector2) (*foundation.NSString, error)
- func TryNSStringFromGLKVector3(vector GLKVector3) (*foundation.NSString, error)
- func TryNSStringFromGLKVector4(vector GLKVector4) (*foundation.NSString, error)
- type GLKBaseEffect
- func (g GLKBaseEffect) Autorelease() GLKBaseEffect
- func (g GLKBaseEffect) ColorMaterialEnabled() uint8
- func (g GLKBaseEffect) ConstantColor() GLKVector4
- func (g GLKBaseEffect) Fog() IGLKEffectPropertyFog
- func (g GLKBaseEffect) Init() GLKBaseEffect
- func (g GLKBaseEffect) Label() string
- func (g GLKBaseEffect) Light0() IGLKEffectPropertyLight
- func (g GLKBaseEffect) Light1() IGLKEffectPropertyLight
- func (g GLKBaseEffect) Light2() IGLKEffectPropertyLight
- func (g GLKBaseEffect) LightModelAmbientColor() GLKVector4
- func (g GLKBaseEffect) LightModelTwoSided() uint8
- func (g GLKBaseEffect) LightingType() GLKLightingType
- func (g GLKBaseEffect) Material() IGLKEffectPropertyMaterial
- func (g GLKBaseEffect) PrepareToDraw()
- func (g GLKBaseEffect) SetColorMaterialEnabled(value uint8)
- func (g GLKBaseEffect) SetConstantColor(value GLKVector4)
- func (g GLKBaseEffect) SetLabel(value string)
- func (g GLKBaseEffect) SetLightModelAmbientColor(value GLKVector4)
- func (g GLKBaseEffect) SetLightModelTwoSided(value uint8)
- func (g GLKBaseEffect) SetLightingType(value GLKLightingType)
- func (g GLKBaseEffect) SetTextureOrder(value []GLKEffectPropertyTexture)
- func (g GLKBaseEffect) SetUseConstantColor(value uint8)
- func (g GLKBaseEffect) Texture2d0() IGLKEffectPropertyTexture
- func (g GLKBaseEffect) Texture2d1() IGLKEffectPropertyTexture
- func (g GLKBaseEffect) TextureOrder() []GLKEffectPropertyTexture
- func (g GLKBaseEffect) Transform() IGLKEffectPropertyTransform
- func (g GLKBaseEffect) UseConstantColor() uint8
- type GLKBaseEffectClass
- type GLKEffectProperty
- type GLKEffectPropertyClass
- type GLKEffectPropertyFog
- func (g GLKEffectPropertyFog) Autorelease() GLKEffectPropertyFog
- func (g GLKEffectPropertyFog) Color() GLKVector4
- func (g GLKEffectPropertyFog) Density() unsafe.Pointer
- func (g GLKEffectPropertyFog) Enabled() uint8
- func (g GLKEffectPropertyFog) End() unsafe.Pointer
- func (g GLKEffectPropertyFog) Init() GLKEffectPropertyFog
- func (g GLKEffectPropertyFog) Mode() int32
- func (g GLKEffectPropertyFog) SetColor(value GLKVector4)
- func (g GLKEffectPropertyFog) SetDensity(value unsafe.Pointer)
- func (g GLKEffectPropertyFog) SetEnabled(value uint8)
- func (g GLKEffectPropertyFog) SetEnd(value unsafe.Pointer)
- func (g GLKEffectPropertyFog) SetMode(value int32)
- func (g GLKEffectPropertyFog) SetStart(value unsafe.Pointer)
- func (g GLKEffectPropertyFog) Start() unsafe.Pointer
- type GLKEffectPropertyFogClass
- type GLKEffectPropertyLight
- func (g GLKEffectPropertyLight) AmbientColor() GLKVector4
- func (g GLKEffectPropertyLight) Autorelease() GLKEffectPropertyLight
- func (g GLKEffectPropertyLight) ConstantAttenuation() unsafe.Pointer
- func (g GLKEffectPropertyLight) DiffuseColor() GLKVector4
- func (g GLKEffectPropertyLight) Enabled() uint8
- func (g GLKEffectPropertyLight) Init() GLKEffectPropertyLight
- func (g GLKEffectPropertyLight) LinearAttenuation() unsafe.Pointer
- func (g GLKEffectPropertyLight) Position() GLKVector4
- func (g GLKEffectPropertyLight) QuadraticAttenuation() unsafe.Pointer
- func (g GLKEffectPropertyLight) SetAmbientColor(value GLKVector4)
- func (g GLKEffectPropertyLight) SetConstantAttenuation(value unsafe.Pointer)
- func (g GLKEffectPropertyLight) SetDiffuseColor(value GLKVector4)
- func (g GLKEffectPropertyLight) SetEnabled(value uint8)
- func (g GLKEffectPropertyLight) SetLinearAttenuation(value unsafe.Pointer)
- func (g GLKEffectPropertyLight) SetPosition(value GLKVector4)
- func (g GLKEffectPropertyLight) SetQuadraticAttenuation(value unsafe.Pointer)
- func (g GLKEffectPropertyLight) SetSpecularColor(value GLKVector4)
- func (g GLKEffectPropertyLight) SetSpotCutoff(value unsafe.Pointer)
- func (g GLKEffectPropertyLight) SetSpotDirection(value GLKVector3)
- func (g GLKEffectPropertyLight) SetSpotExponent(value unsafe.Pointer)
- func (g GLKEffectPropertyLight) SetTransform(value IGLKEffectPropertyTransform)
- func (g GLKEffectPropertyLight) SpecularColor() GLKVector4
- func (g GLKEffectPropertyLight) SpotCutoff() unsafe.Pointer
- func (g GLKEffectPropertyLight) SpotDirection() GLKVector3
- func (g GLKEffectPropertyLight) SpotExponent() unsafe.Pointer
- func (g GLKEffectPropertyLight) Transform() IGLKEffectPropertyTransform
- type GLKEffectPropertyLightClass
- type GLKEffectPropertyMaterial
- func (g GLKEffectPropertyMaterial) AmbientColor() GLKVector4
- func (g GLKEffectPropertyMaterial) Autorelease() GLKEffectPropertyMaterial
- func (g GLKEffectPropertyMaterial) DiffuseColor() GLKVector4
- func (g GLKEffectPropertyMaterial) EmissiveColor() GLKVector4
- func (g GLKEffectPropertyMaterial) Init() GLKEffectPropertyMaterial
- func (g GLKEffectPropertyMaterial) SetAmbientColor(value GLKVector4)
- func (g GLKEffectPropertyMaterial) SetDiffuseColor(value GLKVector4)
- func (g GLKEffectPropertyMaterial) SetEmissiveColor(value GLKVector4)
- func (g GLKEffectPropertyMaterial) SetShininess(value unsafe.Pointer)
- func (g GLKEffectPropertyMaterial) SetSpecularColor(value GLKVector4)
- func (g GLKEffectPropertyMaterial) Shininess() unsafe.Pointer
- func (g GLKEffectPropertyMaterial) SpecularColor() GLKVector4
- type GLKEffectPropertyMaterialClass
- type GLKEffectPropertyPrvPtr
- type GLKEffectPropertyTexture
- func (g GLKEffectPropertyTexture) Autorelease() GLKEffectPropertyTexture
- func (g GLKEffectPropertyTexture) Enabled() uint8
- func (g GLKEffectPropertyTexture) EnvMode() GLKTextureEnvMode
- func (g GLKEffectPropertyTexture) Init() GLKEffectPropertyTexture
- func (g GLKEffectPropertyTexture) Name() uint32
- func (g GLKEffectPropertyTexture) SetEnabled(value uint8)
- func (g GLKEffectPropertyTexture) SetEnvMode(value GLKTextureEnvMode)
- func (g GLKEffectPropertyTexture) SetName(value uint32)
- func (g GLKEffectPropertyTexture) SetTarget(value GLKTextureTarget)
- func (g GLKEffectPropertyTexture) Target() GLKTextureTarget
- type GLKEffectPropertyTextureClass
- type GLKEffectPropertyTransform
- func (g GLKEffectPropertyTransform) Autorelease() GLKEffectPropertyTransform
- func (g GLKEffectPropertyTransform) Init() GLKEffectPropertyTransform
- func (g GLKEffectPropertyTransform) ModelviewMatrix() GLKMatrix4
- func (g GLKEffectPropertyTransform) NormalMatrix() GLKMatrix3
- func (g GLKEffectPropertyTransform) ProjectionMatrix() GLKMatrix4
- func (g GLKEffectPropertyTransform) SetModelviewMatrix(value GLKMatrix4)
- func (g GLKEffectPropertyTransform) SetProjectionMatrix(value GLKMatrix4)
- type GLKEffectPropertyTransformClass
- type GLKFogMode
- type GLKLightingType
- type GLKMatrix2
- type GLKMatrix3
- func GLKMatrix3Invert(matrix GLKMatrix3, isInvertible *bool) GLKMatrix3
- func GLKMatrix3InvertAndTranspose(matrix GLKMatrix3, isInvertible *bool) GLKMatrix3
- func GLKMatrixStackGetMatrix3(stack GLKMatrixStackRef) GLKMatrix3
- func GLKMatrixStackGetMatrix3Inverse(stack GLKMatrixStackRef) GLKMatrix3
- func GLKMatrixStackGetMatrix3InverseTranspose(stack GLKMatrixStackRef) GLKMatrix3
- func TryGLKMatrix3Invert(matrix GLKMatrix3, isInvertible *bool) (GLKMatrix3, error)
- func TryGLKMatrix3InvertAndTranspose(matrix GLKMatrix3, isInvertible *bool) (GLKMatrix3, error)
- func TryGLKMatrixStackGetMatrix3(stack GLKMatrixStackRef) (GLKMatrix3, error)
- func TryGLKMatrixStackGetMatrix3Inverse(stack GLKMatrixStackRef) (GLKMatrix3, error)
- func TryGLKMatrixStackGetMatrix3InverseTranspose(stack GLKMatrixStackRef) (GLKMatrix3, error)
- type GLKMatrix4
- func GLKMatrix4Invert(matrix GLKMatrix4, isInvertible *bool) GLKMatrix4
- func GLKMatrix4InvertAndTranspose(matrix GLKMatrix4, isInvertible *bool) GLKMatrix4
- func GLKMatrixStackGetMatrix4(stack GLKMatrixStackRef) GLKMatrix4
- func GLKMatrixStackGetMatrix4Inverse(stack GLKMatrixStackRef) GLKMatrix4
- func GLKMatrixStackGetMatrix4InverseTranspose(stack GLKMatrixStackRef) GLKMatrix4
- func TryGLKMatrix4Invert(matrix GLKMatrix4, isInvertible *bool) (GLKMatrix4, error)
- func TryGLKMatrix4InvertAndTranspose(matrix GLKMatrix4, isInvertible *bool) (GLKMatrix4, error)
- func TryGLKMatrixStackGetMatrix4(stack GLKMatrixStackRef) (GLKMatrix4, error)
- func TryGLKMatrixStackGetMatrix4Inverse(stack GLKMatrixStackRef) (GLKMatrix4, error)
- func TryGLKMatrixStackGetMatrix4InverseTranspose(stack GLKMatrixStackRef) (GLKMatrix4, error)
- type GLKMatrixStackRef
- type GLKMesh
- type GLKMeshBuffer
- func (g GLKMeshBuffer) Allocator() IGLKMeshBufferAllocator
- func (g GLKMeshBuffer) Autorelease() GLKMeshBuffer
- func (g GLKMeshBuffer) GlBufferName() uint32
- func (g GLKMeshBuffer) Init() GLKMeshBuffer
- func (g GLKMeshBuffer) Length() uint
- func (g GLKMeshBuffer) Offset() uint
- func (g GLKMeshBuffer) Type() uint
- type GLKMeshBufferAllocator
- type GLKMeshBufferAllocatorClass
- type GLKMeshBufferClass
- type GLKMeshClass
- type GLKNamedEffect
- type GLKNamedEffectObject
- type GLKQuaternion
- func GLKQuaternionMakeWithMatrix3(matrix GLKMatrix3) GLKQuaternion
- func GLKQuaternionMakeWithMatrix4(matrix GLKMatrix4) GLKQuaternion
- func GLKQuaternionSlerp(quaternionStart GLKQuaternion, quaternionEnd GLKQuaternion, t float32) GLKQuaternion
- func TryGLKQuaternionMakeWithMatrix3(matrix GLKMatrix3) (GLKQuaternion, error)
- func TryGLKQuaternionMakeWithMatrix4(matrix GLKMatrix4) (GLKQuaternion, error)
- func TryGLKQuaternionSlerp(quaternionStart GLKQuaternion, quaternionEnd GLKQuaternion, t float32) (GLKQuaternion, error)
- type GLKReflectionMapEffect
- func (g GLKReflectionMapEffect) Autorelease() GLKReflectionMapEffect
- func (g GLKReflectionMapEffect) Init() GLKReflectionMapEffect
- func (g GLKReflectionMapEffect) Matrix() GLKMatrix3
- func (g GLKReflectionMapEffect) PrepareToDraw()
- func (g GLKReflectionMapEffect) SetMatrix(value GLKMatrix3)
- func (g GLKReflectionMapEffect) TextureCubeMap() IGLKEffectPropertyTexture
- type GLKReflectionMapEffectClass
- type GLKSkyboxEffect
- func (g GLKSkyboxEffect) Autorelease() GLKSkyboxEffect
- func (g GLKSkyboxEffect) Center() GLKVector3
- func (g GLKSkyboxEffect) Init() GLKSkyboxEffect
- func (g GLKSkyboxEffect) Label() string
- func (g GLKSkyboxEffect) PrepareToDraw()
- func (g GLKSkyboxEffect) SetCenter(value GLKVector3)
- func (g GLKSkyboxEffect) SetLabel(value string)
- func (g GLKSkyboxEffect) SetXSize(value unsafe.Pointer)
- func (g GLKSkyboxEffect) SetYSize(value unsafe.Pointer)
- func (g GLKSkyboxEffect) SetZSize(value unsafe.Pointer)
- func (g GLKSkyboxEffect) TextureCubeMap() IGLKEffectPropertyTexture
- func (g GLKSkyboxEffect) Transform() IGLKEffectPropertyTransform
- func (g GLKSkyboxEffect) XSize() unsafe.Pointer
- func (g GLKSkyboxEffect) YSize() unsafe.Pointer
- func (g GLKSkyboxEffect) ZSize() unsafe.Pointer
- type GLKSkyboxEffectClass
- type GLKSubmesh
- func (g GLKSubmesh) Autorelease() GLKSubmesh
- func (g GLKSubmesh) ElementBuffer() IGLKMeshBuffer
- func (g GLKSubmesh) ElementCount() int32
- func (g GLKSubmesh) Init() GLKSubmesh
- func (g GLKSubmesh) Mesh() IGLKMesh
- func (g GLKSubmesh) Mode() uint32
- func (g GLKSubmesh) Name() string
- func (g GLKSubmesh) Type() uint32
- type GLKSubmeshClass
- type GLKTextureEnvMode
- type GLKTextureInfo
- func (g GLKTextureInfo) AlphaState() GLKTextureInfoAlphaState
- func (g GLKTextureInfo) ArrayLength() uint32
- func (g GLKTextureInfo) Autorelease() GLKTextureInfo
- func (g GLKTextureInfo) ContainsMipmaps() bool
- func (g GLKTextureInfo) Depth() uint32
- func (g GLKTextureInfo) Height() uint32
- func (g GLKTextureInfo) Init() GLKTextureInfo
- func (g GLKTextureInfo) MimapLevelCount() uint32
- func (g GLKTextureInfo) Name() uint32
- func (g GLKTextureInfo) Target() uint32
- func (g GLKTextureInfo) TextureOrigin() GLKTextureInfoOrigin
- func (g GLKTextureInfo) Width() uint32
- type GLKTextureInfoAlphaState
- type GLKTextureInfoClass
- type GLKTextureInfoErrorHandler
- type GLKTextureInfoOrigin
- type GLKTextureLoader
- type GLKTextureLoaderCallback
- type GLKTextureLoaderClass
- type GLKTextureLoaderError
- type GLKTextureTarget
- type GLKVector2
- type GLKVector3
- func GLKMathProject(object GLKVector3, model GLKMatrix4, projection GLKMatrix4, viewport *int32) GLKVector3
- func GLKMathUnproject(window GLKVector3, model GLKMatrix4, projection GLKMatrix4, viewport *int32, ...) GLKVector3
- func GLKQuaternionAxis(quaternion GLKQuaternion) GLKVector3
- func TryGLKMathProject(object GLKVector3, model GLKMatrix4, projection GLKMatrix4, viewport *int32) (GLKVector3, error)
- func TryGLKMathUnproject(window GLKVector3, model GLKMatrix4, projection GLKMatrix4, viewport *int32, ...) (GLKVector3, error)
- func TryGLKQuaternionAxis(quaternion GLKQuaternion) (GLKVector3, error)
- type GLKVector4
- type GLKVertexAttrib
- type GLKVertexAttributeParameters
- type IGLKBaseEffect
- type IGLKEffectProperty
- type IGLKEffectPropertyFog
- type IGLKEffectPropertyLight
- type IGLKEffectPropertyMaterial
- type IGLKEffectPropertyTexture
- type IGLKEffectPropertyTransform
- type IGLKMesh
- type IGLKMeshBuffer
- type IGLKMeshBufferAllocator
- type IGLKReflectionMapEffect
- type IGLKSkyboxEffect
- type IGLKSubmesh
- type IGLKTextureInfo
- type IGLKTextureLoader
Constants ¶
This section is empty.
Variables ¶
var ( // GLKTextureLoaderApplyPremultiplication is whether image data should be premultiplied before being loaded into the sharegroup. // // See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderApplyPremultiplication GLKTextureLoaderApplyPremultiplication string // GLKTextureLoaderErrorDomain is the error domain used by GLKit when returning texture loading errors. // // Deprecated: Deprecated since macOS 10.14. OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings) // // See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderErrorDomain GLKTextureLoaderErrorDomain string // GLKTextureLoaderErrorKey is a key used to retrieve an error string from an error object userinfo dictionary. // // Deprecated: Deprecated since macOS 10.14. OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings) // // See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderErrorKey GLKTextureLoaderErrorKey string // GLKTextureLoaderGLErrorKey is a key used to retrieve additional information from an error object’s userinfo dictionary. // // Deprecated: Deprecated since macOS 10.14. OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings) // // See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderGLErrorKey GLKTextureLoaderGLErrorKey string // GLKTextureLoaderGenerateMipmaps is whether or not to create mipmaps for a texture. // // 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. // // See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderOriginBottomLeft GLKTextureLoaderOriginBottomLeft string // GLKTextureLoaderSRGB is whether or not to treat texture image data as sRGB data. // // Deprecated: Deprecated since macOS 10.14. OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings) // // See: https://developer.apple.com/documentation/GLKit/GLKTextureLoaderSRGB GLKTextureLoaderSRGB string // // Deprecated: Deprecated since macOS 10.14. OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings) // // See: https://developer.apple.com/documentation/GLKit/kGLKModelErrorDomain KGLKModelErrorDomain string // // Deprecated: Deprecated since macOS 10.14. OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings) // // See: https://developer.apple.com/documentation/GLKit/kGLKModelErrorKey KGLKModelErrorKey string )
Functions ¶
func BindFunc ¶
BindFunc binds the GLKit symbol name into fptr, which must be a pointer to a func variable.
The caller supplies the signature, and nothing checks it. A dylib records no argument count or types for a C symbol, so a wrong signature here is not a type error: it is the wrong number of machine words moved on a live stack, and the failure surfaces somewhere else entirely. Prefer a generated binding, whose signature carries recorded evidence, and reach for this only for a symbol that has none. purego.RegisterFunc panics on a signature it cannot lower; that is recovered and returned, because an escape hatch that takes down the process on a mistyped experiment is not one anybody can experiment with.
func GLKMatrixStackGetTypeID ¶
func GLKMatrixStackGetTypeID() uint
GLKMatrixStackGetTypeID returns the Core Foundation type for a matrix stack.
It panics if GLKMatrixStackGetTypeID is unavailable at run time; use TryGLKMatrixStackGetTypeID to get an error instead.
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.
It panics if GLKMatrixStackLoadMatrix4 is unavailable at run time; use TryGLKMatrixStackLoadMatrix4 to get an error instead.
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.
It panics if GLKMatrixStackMultiplyMatrix4 is unavailable at run time; use TryGLKMatrixStackMultiplyMatrix4 to get an error instead.
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.
It panics if GLKMatrixStackMultiplyMatrixStack is unavailable at run time; use TryGLKMatrixStackMultiplyMatrixStack to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackMultiplyMatrixStack(_:_:)
func GLKMatrixStackPop ¶
func GLKMatrixStackPop(stack GLKMatrixStackRef)
GLKMatrixStackPop removes the topmost entry from the stack.
It panics if GLKMatrixStackPop is unavailable at run time; use TryGLKMatrixStackPop to get an error instead.
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.
It panics if GLKMatrixStackPush is unavailable at run time; use TryGLKMatrixStackPush to get an error instead.
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.
It panics if GLKMatrixStackRotate is unavailable at run time; use TryGLKMatrixStackRotate to get an error instead.
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.
It panics if GLKMatrixStackRotateWithVector3 is unavailable at run time; use TryGLKMatrixStackRotateWithVector3 to get an error instead.
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.
It panics if GLKMatrixStackRotateWithVector4 is unavailable at run time; use TryGLKMatrixStackRotateWithVector4 to get an error instead.
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.
It panics if GLKMatrixStackRotateX is unavailable at run time; use TryGLKMatrixStackRotateX to get an error instead.
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.
It panics if GLKMatrixStackRotateY is unavailable at run time; use TryGLKMatrixStackRotateY to get an error instead.
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.
It panics if GLKMatrixStackRotateZ is unavailable at run time; use TryGLKMatrixStackRotateZ to get an error instead.
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.
It panics if GLKMatrixStackScale is unavailable at run time; use TryGLKMatrixStackScale to get an error instead.
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.
It panics if GLKMatrixStackScaleWithVector3 is unavailable at run time; use TryGLKMatrixStackScaleWithVector3 to get an error instead.
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.
It panics if GLKMatrixStackScaleWithVector4 is unavailable at run time; use TryGLKMatrixStackScaleWithVector4 to get an error instead.
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.
It panics if GLKMatrixStackSize is unavailable at run time; use TryGLKMatrixStackSize to get an error instead.
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.
It panics if GLKMatrixStackTranslate is unavailable at run time; use TryGLKMatrixStackTranslate to get an error instead.
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.
It panics if GLKMatrixStackTranslateWithVector3 is unavailable at run time; use TryGLKMatrixStackTranslateWithVector3 to get an error instead.
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.
It panics if GLKMatrixStackTranslateWithVector4 is unavailable at run time; use TryGLKMatrixStackTranslateWithVector4 to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackTranslateWithVector4(_:_:)
func GLKQuaternionAngle ¶
func GLKQuaternionAngle(quaternion GLKQuaternion) float32
GLKQuaternionAngle returns the rotation angle of a quaternion.
It panics if GLKQuaternionAngle is unavailable at run time; use TryGLKQuaternionAngle to get an error instead.
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.
It panics if GLKQuaternionRotateVector3Array is unavailable at run time; use TryGLKQuaternionRotateVector3Array to get an error instead.
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.
It panics if GLKQuaternionRotateVector4Array is unavailable at run time; use TryGLKQuaternionRotateVector4Array to get an error instead.
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.
It panics if NSStringFromGLKMatrix2 is unavailable at run time; use TryNSStringFromGLKMatrix2 to get an error instead.
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.
It panics if NSStringFromGLKMatrix3 is unavailable at run time; use TryNSStringFromGLKMatrix3 to get an error instead.
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.
It panics if NSStringFromGLKMatrix4 is unavailable at run time; use TryNSStringFromGLKMatrix4 to get an error instead.
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.
It panics if NSStringFromGLKQuaternion is unavailable at run time; use TryNSStringFromGLKQuaternion to get an error instead.
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.
It panics if NSStringFromGLKVector2 is unavailable at run time; use TryNSStringFromGLKVector2 to get an error instead.
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.
It panics if NSStringFromGLKVector3 is unavailable at run time; use TryNSStringFromGLKVector3 to get an error instead.
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.
It panics if NSStringFromGLKVector4 is unavailable at run time; use TryNSStringFromGLKVector4 to get an error instead.
See: https://developer.apple.com/documentation/GLKit/NSStringFromGLKVector4(_:)
func NewGLKTextureInfoErrorBlock ¶
func NewGLKTextureInfoErrorBlock(handler GLKTextureInfoErrorHandler) (objc.ID, func())
NewGLKTextureInfoErrorBlock wraps a Go GLKTextureInfoErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
- [GLKTextureLoader.CubeMapWithContentsOfFileOptionsQueueCompletionHandler]
- [GLKTextureLoader.CubeMapWithContentsOfFilesOptionsQueueCompletionHandler]
- [GLKTextureLoader.CubeMapWithContentsOfURLOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithCGImageOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithContentsOfDataOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithContentsOfFileOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithContentsOfURLOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithNameScaleFactorBundleOptionsQueueCompletionHandler]
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.
func SymbolAddress ¶
SymbolAddress returns the address of name in GLKit, whether or not this package generated a binding for it.
What is generated is bounded by what is documented, and for a private framework that is whatever a manifest happened to enumerate. The dylib usually exports far more. Without this, a symbol nobody wrote down is unreachable from a package that has already loaded the image holding it, and the generated surface becomes a ceiling instead of a floor.
The lookup is scoped to this framework's handle, not RTLD_DEFAULT, so a symbol some other loaded image exports is not reported as this one's.
func TryGLKMatrixStackGetTypeID ¶
TryGLKMatrixStackGetTypeID is like GLKMatrixStackGetTypeID but returns an error instead of panicking if GLKMatrixStackGetTypeID is unavailable at run time.
func TryGLKMatrixStackLoadMatrix4 ¶
func TryGLKMatrixStackLoadMatrix4(stack GLKMatrixStackRef, matrix GLKMatrix4) error
TryGLKMatrixStackLoadMatrix4 is like GLKMatrixStackLoadMatrix4 but returns an error instead of panicking if GLKMatrixStackLoadMatrix4 is unavailable at run time.
func TryGLKMatrixStackMultiplyMatrix4 ¶
func TryGLKMatrixStackMultiplyMatrix4(stack GLKMatrixStackRef, matrix GLKMatrix4) error
TryGLKMatrixStackMultiplyMatrix4 is like GLKMatrixStackMultiplyMatrix4 but returns an error instead of panicking if GLKMatrixStackMultiplyMatrix4 is unavailable at run time.
func TryGLKMatrixStackMultiplyMatrixStack ¶
func TryGLKMatrixStackMultiplyMatrixStack(stackLeft GLKMatrixStackRef, stackRight GLKMatrixStackRef) error
TryGLKMatrixStackMultiplyMatrixStack is like GLKMatrixStackMultiplyMatrixStack but returns an error instead of panicking if GLKMatrixStackMultiplyMatrixStack is unavailable at run time.
func TryGLKMatrixStackPop ¶
func TryGLKMatrixStackPop(stack GLKMatrixStackRef) error
TryGLKMatrixStackPop is like GLKMatrixStackPop but returns an error instead of panicking if GLKMatrixStackPop is unavailable at run time.
func TryGLKMatrixStackPush ¶
func TryGLKMatrixStackPush(stack GLKMatrixStackRef) error
TryGLKMatrixStackPush is like GLKMatrixStackPush but returns an error instead of panicking if GLKMatrixStackPush is unavailable at run time.
func TryGLKMatrixStackRotate ¶
func TryGLKMatrixStackRotate(stack GLKMatrixStackRef, radians float32, x float32, y float32, z float32) error
TryGLKMatrixStackRotate is like GLKMatrixStackRotate but returns an error instead of panicking if GLKMatrixStackRotate is unavailable at run time.
func TryGLKMatrixStackRotateWithVector3 ¶
func TryGLKMatrixStackRotateWithVector3(stack GLKMatrixStackRef, radians float32, axisVector GLKVector3) error
TryGLKMatrixStackRotateWithVector3 is like GLKMatrixStackRotateWithVector3 but returns an error instead of panicking if GLKMatrixStackRotateWithVector3 is unavailable at run time.
func TryGLKMatrixStackRotateWithVector4 ¶
func TryGLKMatrixStackRotateWithVector4(stack GLKMatrixStackRef, radians float32, axisVector GLKVector4) error
TryGLKMatrixStackRotateWithVector4 is like GLKMatrixStackRotateWithVector4 but returns an error instead of panicking if GLKMatrixStackRotateWithVector4 is unavailable at run time.
func TryGLKMatrixStackRotateX ¶
func TryGLKMatrixStackRotateX(stack GLKMatrixStackRef, radians float32) error
TryGLKMatrixStackRotateX is like GLKMatrixStackRotateX but returns an error instead of panicking if GLKMatrixStackRotateX is unavailable at run time.
func TryGLKMatrixStackRotateY ¶
func TryGLKMatrixStackRotateY(stack GLKMatrixStackRef, radians float32) error
TryGLKMatrixStackRotateY is like GLKMatrixStackRotateY but returns an error instead of panicking if GLKMatrixStackRotateY is unavailable at run time.
func TryGLKMatrixStackRotateZ ¶
func TryGLKMatrixStackRotateZ(stack GLKMatrixStackRef, radians float32) error
TryGLKMatrixStackRotateZ is like GLKMatrixStackRotateZ but returns an error instead of panicking if GLKMatrixStackRotateZ is unavailable at run time.
func TryGLKMatrixStackScale ¶
func TryGLKMatrixStackScale(stack GLKMatrixStackRef, sx float32, sy float32, sz float32) error
TryGLKMatrixStackScale is like GLKMatrixStackScale but returns an error instead of panicking if GLKMatrixStackScale is unavailable at run time.
func TryGLKMatrixStackScaleWithVector3 ¶
func TryGLKMatrixStackScaleWithVector3(stack GLKMatrixStackRef, scaleVector GLKVector3) error
TryGLKMatrixStackScaleWithVector3 is like GLKMatrixStackScaleWithVector3 but returns an error instead of panicking if GLKMatrixStackScaleWithVector3 is unavailable at run time.
func TryGLKMatrixStackScaleWithVector4 ¶
func TryGLKMatrixStackScaleWithVector4(stack GLKMatrixStackRef, scaleVector GLKVector4) error
TryGLKMatrixStackScaleWithVector4 is like GLKMatrixStackScaleWithVector4 but returns an error instead of panicking if GLKMatrixStackScaleWithVector4 is unavailable at run time.
func TryGLKMatrixStackSize ¶
func TryGLKMatrixStackSize(stack GLKMatrixStackRef) (int32, error)
TryGLKMatrixStackSize is like GLKMatrixStackSize but returns an error instead of panicking if GLKMatrixStackSize is unavailable at run time.
func TryGLKMatrixStackTranslate ¶
func TryGLKMatrixStackTranslate(stack GLKMatrixStackRef, tx float32, ty float32, tz float32) error
TryGLKMatrixStackTranslate is like GLKMatrixStackTranslate but returns an error instead of panicking if GLKMatrixStackTranslate is unavailable at run time.
func TryGLKMatrixStackTranslateWithVector3 ¶
func TryGLKMatrixStackTranslateWithVector3(stack GLKMatrixStackRef, translationVector GLKVector3) error
TryGLKMatrixStackTranslateWithVector3 is like GLKMatrixStackTranslateWithVector3 but returns an error instead of panicking if GLKMatrixStackTranslateWithVector3 is unavailable at run time.
func TryGLKMatrixStackTranslateWithVector4 ¶
func TryGLKMatrixStackTranslateWithVector4(stack GLKMatrixStackRef, translationVector GLKVector4) error
TryGLKMatrixStackTranslateWithVector4 is like GLKMatrixStackTranslateWithVector4 but returns an error instead of panicking if GLKMatrixStackTranslateWithVector4 is unavailable at run time.
func TryGLKQuaternionAngle ¶
func TryGLKQuaternionAngle(quaternion GLKQuaternion) (float32, error)
TryGLKQuaternionAngle is like GLKQuaternionAngle but returns an error instead of panicking if GLKQuaternionAngle is unavailable at run time.
func TryGLKQuaternionRotateVector3Array ¶
func TryGLKQuaternionRotateVector3Array(quaternion GLKQuaternion, vectors *GLKVector3, vectorCount uintptr) error
TryGLKQuaternionRotateVector3Array is like GLKQuaternionRotateVector3Array but returns an error instead of panicking if GLKQuaternionRotateVector3Array is unavailable at run time.
func TryGLKQuaternionRotateVector4Array ¶
func TryGLKQuaternionRotateVector4Array(quaternion GLKQuaternion, vectors *GLKVector4, vectorCount uintptr) error
TryGLKQuaternionRotateVector4Array is like GLKQuaternionRotateVector4Array but returns an error instead of panicking if GLKQuaternionRotateVector4Array is unavailable at run time.
func TryNSStringFromGLKMatrix2 ¶
func TryNSStringFromGLKMatrix2(matrix GLKMatrix2) (*foundation.NSString, error)
TryNSStringFromGLKMatrix2 is like NSStringFromGLKMatrix2 but returns an error instead of panicking if NSStringFromGLKMatrix2 is unavailable at run time.
func TryNSStringFromGLKMatrix3 ¶
func TryNSStringFromGLKMatrix3(matrix GLKMatrix3) (*foundation.NSString, error)
TryNSStringFromGLKMatrix3 is like NSStringFromGLKMatrix3 but returns an error instead of panicking if NSStringFromGLKMatrix3 is unavailable at run time.
func TryNSStringFromGLKMatrix4 ¶
func TryNSStringFromGLKMatrix4(matrix GLKMatrix4) (*foundation.NSString, error)
TryNSStringFromGLKMatrix4 is like NSStringFromGLKMatrix4 but returns an error instead of panicking if NSStringFromGLKMatrix4 is unavailable at run time.
func TryNSStringFromGLKQuaternion ¶
func TryNSStringFromGLKQuaternion(quaternion GLKQuaternion) (*foundation.NSString, error)
TryNSStringFromGLKQuaternion is like NSStringFromGLKQuaternion but returns an error instead of panicking if NSStringFromGLKQuaternion is unavailable at run time.
func TryNSStringFromGLKVector2 ¶
func TryNSStringFromGLKVector2(vector GLKVector2) (*foundation.NSString, error)
TryNSStringFromGLKVector2 is like NSStringFromGLKVector2 but returns an error instead of panicking if NSStringFromGLKVector2 is unavailable at run time.
func TryNSStringFromGLKVector3 ¶
func TryNSStringFromGLKVector3(vector GLKVector3) (*foundation.NSString, error)
TryNSStringFromGLKVector3 is like NSStringFromGLKVector3 but returns an error instead of panicking if NSStringFromGLKVector3 is unavailable at run time.
func TryNSStringFromGLKVector4 ¶
func TryNSStringFromGLKVector4(vector GLKVector4) (*foundation.NSString, error)
TryNSStringFromGLKVector4 is like NSStringFromGLKVector4 but returns an error instead of panicking if NSStringFromGLKVector4 is unavailable at run time.
Types ¶
type GLKBaseEffect ¶
type GLKBaseEffect struct {
objectivec.Object
}
A simple lighting and shading system for use in shader-based OpenGL rendering.
Overview ¶
The GLKBaseEffect class provides shaders that mimic many of the behaviors provided by the OpenGL ES 1.1 lighting and shading model, including materials, lighting and texturing. The base effect allows up to three lights and two textures to be applied to a scene.
At initialization time, your application first creates a compatible OpenGL or OpenGL ES context and makes it current. Then, it allocates and initializes a new effect object, configures its properties, and calls its prepareToDraw() method. Binding an effect causes a shader to be compiled and bound to the current context. The base effect also requires vertex data to be supplied by your application. To supply vertex data, create one or more vertex array objects. For each attribute required by the shader, the vertex array object should enable the attribute and point to data stored in a vertex buffer object.
At rendering time, your application calls the effect’s prepareToDraw() method to prepare the effect. Then, it binds a vertex array object and submits one or more drawing commands.
Lighting calculations for the base effect are done in eye-space coordinates. The GLKBaseEffect.Light0, GLKBaseEffect.Light1 and GLKBaseEffect.Light2 properties hold the position and spot direction of the base effect’s lights. The GLKBaseEffect.Transform property contains the model view matrix assigned to the scene. When a light is assigned a new position or spot direction, those values are immediately modified by the current model view matrix. Thus, it is important to sequence changes to the model view matrix and changes to the lights to achieve the desired light positioning. Light positions that need to be transformed in a manner similar to scene geometry should be set after the model view matrix is updated.
Subclassing ¶
Although this class can be subclassed, there are no methods your subclass can use to directly override the underlying shader generation. Instead, your subclass should implement its functionality by changing the values of existing properties declared by the base class.
Naming the Effect ¶
- GLKBaseEffect.Label: A string used to name your effect.
- GLKBaseEffect.SetLabel
Configuring the Modelview Transform ¶
- GLKBaseEffect.Transform: The modelview, projection and texture transformations applied to the vertex data when the effect is bound.
Configuring Lights ¶
- GLKBaseEffect.LightingType: The strategy the effect uses to calculate light values at each fragment. See GLKLightingType(<https://developer.apple.com/documentation/GLKit/GLKLightingType>).
- GLKBaseEffect.SetLightingType
- GLKBaseEffect.LightModelTwoSided: A Boolean value that indicates whether lighting is calculated for both sides of a primitive.
- GLKBaseEffect.SetLightModelTwoSided
- GLKBaseEffect.Material: The material properties used when calculating the light values for a rendered primitive.
- GLKBaseEffect.LightModelAmbientColor: The ambient color applied to all primitives rendered by the effect.
- GLKBaseEffect.SetLightModelAmbientColor
- GLKBaseEffect.Light0: The lighting properties for the first light in the scene.
- GLKBaseEffect.Light1: The lighting properties for the second light in the scene.
- GLKBaseEffect.Light2: The lighting properties for the third light in the scene.
Configuring Textures ¶
- GLKBaseEffect.Texture2d0: The properties for the first texture.
- GLKBaseEffect.Texture2d1: The properties for the second texture.
- GLKBaseEffect.TextureOrder: The order in which textures are applied to rendered primitives.
- GLKBaseEffect.SetTextureOrder
Configuring Fog ¶
- GLKBaseEffect.Fog: The fog properties to apply to the scene.
Configuring Color Information ¶
- GLKBaseEffect.ColorMaterialEnabled: A Boolean value that indicates whether or not to use the color vertex attribute when calculating the light’s interaction with the material.
- GLKBaseEffect.SetColorMaterialEnabled
- GLKBaseEffect.UseConstantColor: A Boolean value that indicates whether or not to use the constant color.
- GLKBaseEffect.SetUseConstantColor
- GLKBaseEffect.ConstantColor: A constant color, used when per-vertex color data is not provided.
- GLKBaseEffect.SetConstantColor
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect
func GLKBaseEffectFromID ¶
func GLKBaseEffectFromID(id objc.ID) GLKBaseEffect
GLKBaseEffectFromID constructs a GLKBaseEffect from an objc.ID.
A simple lighting and shading system for use in shader-based OpenGL rendering.
func NewGLKBaseEffect ¶
func NewGLKBaseEffect() GLKBaseEffect
NewGLKBaseEffect creates a new GLKBaseEffect instance.
func (GLKBaseEffect) Autorelease ¶
func (g GLKBaseEffect) Autorelease() GLKBaseEffect
Autorelease adds the receiver to the current autorelease pool.
func (GLKBaseEffect) ColorMaterialEnabled ¶
func (g GLKBaseEffect) ColorMaterialEnabled() uint8
A Boolean value that indicates whether or not to use the color vertex attribute when calculating the light’s interaction with the material.
Discussion ¶
If the value is set to `GL_TRUE`, then the color attribute provided in the vertex data is used as the material’s color when performing any lighting calculations. If the value is set to `GL_FALSE` then the colors stored in the GLKBaseEffect.Material property are used to light the primitive. The default value is `GL_FALSE`.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/colorMaterialEnabled
func (GLKBaseEffect) ConstantColor ¶
func (g GLKBaseEffect) ConstantColor() GLKVector4
A constant color, used when per-vertex color data is not provided.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/constantColor
func (GLKBaseEffect) Fog ¶
func (g GLKBaseEffect) Fog() IGLKEffectPropertyFog
The fog properties to apply to the scene.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/fog
func (GLKBaseEffect) Init ¶
func (g GLKBaseEffect) Init() GLKBaseEffect
Init initializes the instance.
func (GLKBaseEffect) Label ¶
func (g GLKBaseEffect) Label() string
A string used to name your effect.
Discussion ¶
The name of the effect isn’t used directly by GLKit, but is printed when, for example, you log the object to the console via the https://developer.apple.com/documentation/foundation/1395275-nslog function.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/label
func (GLKBaseEffect) Light0 ¶
func (g GLKBaseEffect) Light0() IGLKEffectPropertyLight
The lighting properties for the first light in the scene.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/light0
func (GLKBaseEffect) Light1 ¶
func (g GLKBaseEffect) Light1() IGLKEffectPropertyLight
The lighting properties for the second light in the scene.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/light1
func (GLKBaseEffect) Light2 ¶
func (g GLKBaseEffect) Light2() IGLKEffectPropertyLight
The lighting properties for the third light in the scene.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/light2
func (GLKBaseEffect) LightModelAmbientColor ¶
func (g GLKBaseEffect) LightModelAmbientColor() GLKVector4
The ambient color applied to all primitives rendered by the effect.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/lightModelAmbientColor
func (GLKBaseEffect) LightModelTwoSided ¶
func (g GLKBaseEffect) LightModelTwoSided() uint8
A Boolean value that indicates whether lighting is calculated for both sides of a primitive.
Discussion ¶
If the value is `GL_TRUE` and the back face of a primitive is being rendered, the lighting values are calculated by negating the surface normals for the primitive. If the value is `GL_FALSE`, then the facing of the primitive is ignored when performing the lighting calculation. The default value is `GL_FALSE`.
Setting the value of this property to `GL_TRUE` may impact performance. Only use two-sided lighting when either side of a primitive could theoretically be visible to the camera.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/lightModelTwoSided
func (GLKBaseEffect) LightingType ¶
func (g GLKBaseEffect) LightingType() GLKLightingType
The strategy the effect uses to calculate light values at each fragment. See GLKLightingType.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/lightingType
func (GLKBaseEffect) Material ¶
func (g GLKBaseEffect) Material() IGLKEffectPropertyMaterial
The material properties used when calculating the light values for a rendered primitive.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/material
func (GLKBaseEffect) PrepareToDraw ¶
func (g GLKBaseEffect) 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()
func (GLKBaseEffect) SetColorMaterialEnabled ¶
func (g GLKBaseEffect) SetColorMaterialEnabled(value uint8)
func (GLKBaseEffect) SetConstantColor ¶
func (g GLKBaseEffect) SetConstantColor(value GLKVector4)
func (GLKBaseEffect) SetLabel ¶
func (g GLKBaseEffect) SetLabel(value string)
func (GLKBaseEffect) SetLightModelAmbientColor ¶
func (g GLKBaseEffect) SetLightModelAmbientColor(value GLKVector4)
func (GLKBaseEffect) SetLightModelTwoSided ¶
func (g GLKBaseEffect) SetLightModelTwoSided(value uint8)
func (GLKBaseEffect) SetLightingType ¶
func (g GLKBaseEffect) SetLightingType(value GLKLightingType)
func (GLKBaseEffect) SetTextureOrder ¶
func (g GLKBaseEffect) SetTextureOrder(value []GLKEffectPropertyTexture)
func (GLKBaseEffect) SetUseConstantColor ¶
func (g GLKBaseEffect) SetUseConstantColor(value uint8)
func (GLKBaseEffect) Texture2d0 ¶
func (g GLKBaseEffect) Texture2d0() IGLKEffectPropertyTexture
The properties for the first texture.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/texture2d0
func (GLKBaseEffect) Texture2d1 ¶
func (g GLKBaseEffect) Texture2d1() IGLKEffectPropertyTexture
The properties for the second texture.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/texture2d1
func (GLKBaseEffect) TextureOrder ¶
func (g GLKBaseEffect) TextureOrder() []GLKEffectPropertyTexture
The order in which textures are applied to rendered primitives.
Discussion ¶
The value of this property should be an array whose contents are all GLKEffectPropertyTexture objects provided by the effect. The order of these objects in the array determines the order in which the textures are applied in the shader. For example, to reverse the order that the textures are applied to a scene, your application would use the following code:
The default value is an array that executes the texture stages in increasing order, skipping any texture stages that are not enabled.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/textureOrder
func (GLKBaseEffect) Transform ¶
func (g GLKBaseEffect) Transform() IGLKEffectPropertyTransform
The modelview, projection and texture transformations applied to the vertex data when the effect is bound.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/transform
func (GLKBaseEffect) UseConstantColor ¶
func (g GLKBaseEffect) UseConstantColor() uint8
A Boolean value that indicates whether or not to use the constant color.
Discussion ¶
If the value is set to `GL_TRUE`, then the value stored in the GLKBaseEffect.ConstantColor property is used as the color value for each vertex. If the value is set to `GL_FALSE`, then your application is expected to enable the GLKVertexAttrib.color attribute and provide per-vertex color data. The default value is `GL_FALSE`.
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect/useConstantColor
type GLKBaseEffectClass ¶
type GLKBaseEffectClass struct {
// contains filtered or unexported fields
}
func GetGLKBaseEffectClass ¶
func GetGLKBaseEffectClass() GLKBaseEffectClass
GetGLKBaseEffectClass returns the class object for GLKBaseEffect.
func (GLKBaseEffectClass) Alloc ¶
func (gc GLKBaseEffectClass) Alloc() GLKBaseEffect
Alloc allocates memory for a new instance of the class.
func (GLKBaseEffectClass) Class ¶
func (gc GLKBaseEffectClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKEffectProperty ¶
type GLKEffectProperty struct {
objectivec.Object
}
The abstract superclass for configuration information used in GLKit rendering effects.
Overview ¶
Subclasses of GLKEffectProperty provide one or more Objective-C properties that define how that state can be configured for an effect.
See: https://developer.apple.com/documentation/GLKit/GLKEffectProperty
func GLKEffectPropertyFromID ¶
func GLKEffectPropertyFromID(id objc.ID) GLKEffectProperty
GLKEffectPropertyFromID constructs a GLKEffectProperty from an objc.ID.
The abstract superclass for configuration information used in GLKit rendering effects.
func NewGLKEffectProperty ¶
func NewGLKEffectProperty() GLKEffectProperty
NewGLKEffectProperty creates a new GLKEffectProperty instance.
func (GLKEffectProperty) Autorelease ¶
func (g GLKEffectProperty) Autorelease() GLKEffectProperty
Autorelease adds the receiver to the current autorelease pool.
func (GLKEffectProperty) Init ¶
func (g GLKEffectProperty) Init() GLKEffectProperty
Init initializes the instance.
type GLKEffectPropertyClass ¶
type GLKEffectPropertyClass struct {
// contains filtered or unexported fields
}
func GetGLKEffectPropertyClass ¶
func GetGLKEffectPropertyClass() GLKEffectPropertyClass
GetGLKEffectPropertyClass returns the class object for GLKEffectProperty.
func (GLKEffectPropertyClass) Alloc ¶
func (gc GLKEffectPropertyClass) Alloc() GLKEffectProperty
Alloc allocates memory for a new instance of the class.
func (GLKEffectPropertyClass) Class ¶
func (gc GLKEffectPropertyClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKEffectPropertyFog ¶
type GLKEffectPropertyFog struct {
GLKEffectProperty
}
Fog drawing information for use in GLKit rendering effects.
Overview ¶
These properties are specifically designed to mimic the fog calculations provided by OpenGL ES 1.1.
When fog is enabled, the fog component is calculated and clamped to a range from `0.0` to `1.0`. Then, the fog value is used as a blending factor between the computed fragment color and the fog color.
Enabling Fog ¶
- GLKEffectPropertyFog.Enabled: A Boolean value that indicates whether fog is applied to the fragment color.
- GLKEffectPropertyFog.SetEnabled
Choosing the Fog Mode ¶
- GLKEffectPropertyFog.Mode: The algorithm used to compute the density of the fog applied to the fragment color.
- GLKEffectPropertyFog.SetMode
Fog Properties ¶
- GLKEffectPropertyFog.Color: The color of the fog at maximum density.
- GLKEffectPropertyFog.SetColor
- GLKEffectPropertyFog.Density: The rate at which the fog exponent increases.
- GLKEffectPropertyFog.SetDensity
- GLKEffectPropertyFog.Start: The minimum distance in eye coordinates before fog is applied to the fragment color.
- GLKEffectPropertyFog.SetStart
- GLKEffectPropertyFog.End: The distance in eye coordinates where fog completely covers the color fragment.
- GLKEffectPropertyFog.SetEnd
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyFog
func GLKEffectPropertyFogFromID ¶
func GLKEffectPropertyFogFromID(id objc.ID) GLKEffectPropertyFog
GLKEffectPropertyFogFromID constructs a GLKEffectPropertyFog from an objc.ID.
Fog drawing information for use in GLKit rendering effects.
func NewGLKEffectPropertyFog ¶
func NewGLKEffectPropertyFog() GLKEffectPropertyFog
NewGLKEffectPropertyFog creates a new GLKEffectPropertyFog instance.
func (GLKEffectPropertyFog) Autorelease ¶
func (g GLKEffectPropertyFog) Autorelease() GLKEffectPropertyFog
Autorelease adds the receiver to the current autorelease pool.
func (GLKEffectPropertyFog) Color ¶
func (g GLKEffectPropertyFog) Color() GLKVector4
The color of the fog at maximum density.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyFog/color
func (GLKEffectPropertyFog) Density ¶
func (g GLKEffectPropertyFog) Density() unsafe.Pointer
The rate at which the fog exponent increases.
Discussion ¶
This property is ignored when the GLKEffectPropertyFog.Mode property is set to GLKFogMode.linear.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyFog/density
func (GLKEffectPropertyFog) Enabled ¶
func (g GLKEffectPropertyFog) Enabled() uint8
A Boolean value that indicates whether fog is applied to the fragment color.
Discussion ¶
If the value of this property is `GL_TRUE`, then fog calculations are performed each time a fragment is computed. If the value of this property is `GL_FALSE`, then fog calculations are skipped. The default value is `GL_TRUE`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyFog/enabled
func (GLKEffectPropertyFog) End ¶
func (g GLKEffectPropertyFog) End() unsafe.Pointer
The distance in eye coordinates where fog completely covers the color fragment.
Discussion ¶
This property is ignored when the GLKEffectPropertyFog.Mode property is set to GLKFogMode.exp or GLKFogMode.exp2.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyFog/end
func (GLKEffectPropertyFog) Init ¶
func (g GLKEffectPropertyFog) Init() GLKEffectPropertyFog
Init initializes the instance.
func (GLKEffectPropertyFog) Mode ¶
func (g GLKEffectPropertyFog) Mode() int32
The algorithm used to compute the density of the fog applied to the fragment color.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyFog/mode
func (GLKEffectPropertyFog) SetColor ¶
func (g GLKEffectPropertyFog) SetColor(value GLKVector4)
func (GLKEffectPropertyFog) SetDensity ¶
func (g GLKEffectPropertyFog) SetDensity(value unsafe.Pointer)
func (GLKEffectPropertyFog) SetEnabled ¶
func (g GLKEffectPropertyFog) SetEnabled(value uint8)
func (GLKEffectPropertyFog) SetEnd ¶
func (g GLKEffectPropertyFog) SetEnd(value unsafe.Pointer)
func (GLKEffectPropertyFog) SetMode ¶
func (g GLKEffectPropertyFog) SetMode(value int32)
func (GLKEffectPropertyFog) SetStart ¶
func (g GLKEffectPropertyFog) SetStart(value unsafe.Pointer)
func (GLKEffectPropertyFog) Start ¶
func (g GLKEffectPropertyFog) Start() unsafe.Pointer
The minimum distance in eye coordinates before fog is applied to the fragment color.
Discussion ¶
This property is ignored when the GLKEffectPropertyFog.Mode property is set to GLKFogMode.exp or GLKFogMode.exp2.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyFog/start
type GLKEffectPropertyFogClass ¶
type GLKEffectPropertyFogClass struct {
// contains filtered or unexported fields
}
func GetGLKEffectPropertyFogClass ¶
func GetGLKEffectPropertyFogClass() GLKEffectPropertyFogClass
GetGLKEffectPropertyFogClass returns the class object for GLKEffectPropertyFog.
func (GLKEffectPropertyFogClass) Alloc ¶
func (gc GLKEffectPropertyFogClass) Alloc() GLKEffectPropertyFog
Alloc allocates memory for a new instance of the class.
func (GLKEffectPropertyFogClass) Class ¶
func (gc GLKEffectPropertyFogClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKEffectPropertyLight ¶
type GLKEffectPropertyLight struct {
GLKEffectProperty
}
Lighting information for use in GLKit rendering effects.
Overview ¶
The lighting model implemented by GLKEffectPropertyLight is identical to the lighting model implemented in OpenGL ES 1.1; each light interacts with any material properties on the effect to determine the intensity and color that particular light contributes to the scene at a fragment.
There are three basic kinds of lights: directional, point and spotlights.
- A directional light is considered to be infinitely far away, and always directs light in the same direction. To create a directional light, set the GLKEffectPropertyLight.Position property to a vector whose `x`, `y`, and `z` components specify the direction to the light (that is, the negation of the direction the light is travelling in), and whose `w` component is set to `0.0`. - A point light is placed at a position within the scene, and emits light in all directions. To create a directional light, set the GLKEffectPropertyLight.Position property to a vector whose `x`, `y`, `z` and `w` components specify the homogenous coordinates for the position of the light in the scene. The `w` component is typically set to `1.0` and must not be set to `0.0`.
The intensity of a point light is adjusted using an distance attenuation function. This function is controlled by adjusting the GLKEffectPropertyLight.ConstantAttenuation, GLKEffectPropertyLight.LinearAttenuation or GLKEffectPropertyLight.QuadraticAttenuation properties. The default values for these properties create a light whose intensity is constant over distance.
- A spotlight is placed at a position within the scene, and emits light in a specific direction in a cone. To create a spotlight, set the GLKEffectPropertyLight.Position property to a vector whose `x`, `y`, `z` and `w` components specify the homogenous coordinates for the position of the light in the scene. The `w` component must not be set to `0.0`. Then, set the GLKEffectPropertyLight.SpotDirection property to a vector that specifies the direction of the light and the GLKEffectPropertyLight.SpotCutoff to a value less than `180.0`.
Like a point light, a spotlight’s intensity can be adjusted using the distance attenuation properties. A spotlight’s intensity can also be changed as a function of the spotlight angle by setting the GLKEffectPropertyLight.SpotExponent property. The default value for a spotlight creates a spotlight whose intensity is not affected by the angle. That is, the spotlight radiates the same amount of light at the center and at the edge of the cone.
Lighting calculations are performed in eye-space coordinates. The eye-space coordinates for the position and the spot direction are calculated at the precise moment that new position values are specified and may be affected by other properties of the effect. For more information, see GLKBaseEffect.
Configuring Common Lighting Properties ¶
- GLKEffectPropertyLight.Enabled: A Boolean value that indicates whether calculations should be performed on this light.
- GLKEffectPropertyLight.SetEnabled
- GLKEffectPropertyLight.Position: The position of the light in world coordinates.
- GLKEffectPropertyLight.SetPosition
- GLKEffectPropertyLight.Transform: A transform applied to the light’s position and direction before calculating the contribution of the light.
- GLKEffectPropertyLight.SetTransform
Configuring Light Colors ¶
- GLKEffectPropertyLight.AmbientColor: The ambient portion of the light.
- GLKEffectPropertyLight.SetAmbientColor
- GLKEffectPropertyLight.DiffuseColor: The diffuse portion of the light.
- GLKEffectPropertyLight.SetDiffuseColor
- GLKEffectPropertyLight.SpecularColor: The specular portion of the light.
- GLKEffectPropertyLight.SetSpecularColor
Configuring Lighting Attenuation ¶
- GLKEffectPropertyLight.ConstantAttenuation: A constant factor applied to the attenuation of a point light or spotlight.
- GLKEffectPropertyLight.SetConstantAttenuation
- GLKEffectPropertyLight.LinearAttenuation: A linear factor applied to the attenuation of a point light or spotlight.
- GLKEffectPropertyLight.SetLinearAttenuation
- GLKEffectPropertyLight.QuadraticAttenuation: A quadratic factor applied to the attenuation of a point light or spotlight.
- GLKEffectPropertyLight.SetQuadraticAttenuation
Configuring Spotlight Properties ¶
- GLKEffectPropertyLight.SpotCutoff: The angle in degrees where the spotlight is cut off.
- GLKEffectPropertyLight.SetSpotCutoff
- GLKEffectPropertyLight.SpotDirection: A vector indicating the direction the spotlight is projecting.
- GLKEffectPropertyLight.SetSpotDirection
- GLKEffectPropertyLight.SpotExponent: A value indicating how focused the spotlight is.
- GLKEffectPropertyLight.SetSpotExponent
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight
func GLKEffectPropertyLightFromID ¶
func GLKEffectPropertyLightFromID(id objc.ID) GLKEffectPropertyLight
GLKEffectPropertyLightFromID constructs a GLKEffectPropertyLight from an objc.ID.
Lighting information for use in GLKit rendering effects.
func NewGLKEffectPropertyLight ¶
func NewGLKEffectPropertyLight() GLKEffectPropertyLight
NewGLKEffectPropertyLight creates a new GLKEffectPropertyLight instance.
func (GLKEffectPropertyLight) AmbientColor ¶
func (g GLKEffectPropertyLight) AmbientColor() GLKVector4
The ambient portion of the light.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/ambientColor
func (GLKEffectPropertyLight) Autorelease ¶
func (g GLKEffectPropertyLight) Autorelease() GLKEffectPropertyLight
Autorelease adds the receiver to the current autorelease pool.
func (GLKEffectPropertyLight) ConstantAttenuation ¶
func (g GLKEffectPropertyLight) ConstantAttenuation() unsafe.Pointer
A constant factor applied to the attenuation of a point light or spotlight.
Discussion ¶
The distance attenuation factor is calculated as `1.0 / (k0 + k1 * d + k2 * d * d)`, where `d` represents the distance from the light to the point being lit. The GLKEffectPropertyLight.ConstantAttenuation property is represented in this calculation as `k0`. The default value is `1.0`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/constantAttenuation
func (GLKEffectPropertyLight) DiffuseColor ¶
func (g GLKEffectPropertyLight) DiffuseColor() GLKVector4
The diffuse portion of the light.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/diffuseColor
func (GLKEffectPropertyLight) Enabled ¶
func (g GLKEffectPropertyLight) Enabled() uint8
A Boolean value that indicates whether calculations should be performed on this light.
Discussion ¶
If the value of GLKEffectPropertyLight.Enabled is `GL_TRUE`, then lighting calculations are performed for this light. If the value is `GL_FALSE`, this light is skipped when computing the fragment color.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/enabled
func (GLKEffectPropertyLight) Init ¶
func (g GLKEffectPropertyLight) Init() GLKEffectPropertyLight
Init initializes the instance.
func (GLKEffectPropertyLight) LinearAttenuation ¶
func (g GLKEffectPropertyLight) LinearAttenuation() unsafe.Pointer
A linear factor applied to the attenuation of a point light or spotlight.
Discussion ¶
The distance attenuation factor is calculated as `1.0 / (k0 + k1 * d + k2 * d * d)`, where `d` represents the distance from the light to the point being lit. The GLKEffectPropertyLight.LinearAttenuation property is represented in this calculation as `k1`. The default value is `0.0`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/linearAttenuation
func (GLKEffectPropertyLight) Position ¶
func (g GLKEffectPropertyLight) Position() GLKVector4
The position of the light in world coordinates.
Discussion ¶
If the `w` component of the position is `0.0`, the light is calculated using the directional light formula. The `x`, `y`, and `z` components of the vector specify the direction the light shines. The light is assumed to be infinitely far away; attenuation and spotlight properties are ignored.
If the `w` component of the position is a non-zero value, the coordinates specify the position of the light in homogenous coordinates, and the light is either calculated as a point light or a spotlight, depending on the value of the GLKEffectPropertyLight.SpotCutoff property.
The default value is `[0.0, 0.0, 1.0, 0.0]`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/position
func (GLKEffectPropertyLight) QuadraticAttenuation ¶
func (g GLKEffectPropertyLight) QuadraticAttenuation() unsafe.Pointer
A quadratic factor applied to the attenuation of a point light or spotlight.
Discussion ¶
The distance attenuation factor is calculated as `1.0 / (k0 + k1 * d + k2 * d * d)`, where `d` represents the distance from the light to the point being lit. The GLKEffectPropertyLight.QuadraticAttenuation property is represented in this calculation as `k2`. The default value is `0.0`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/quadraticAttenuation
func (GLKEffectPropertyLight) SetAmbientColor ¶
func (g GLKEffectPropertyLight) SetAmbientColor(value GLKVector4)
func (GLKEffectPropertyLight) SetConstantAttenuation ¶
func (g GLKEffectPropertyLight) SetConstantAttenuation(value unsafe.Pointer)
func (GLKEffectPropertyLight) SetDiffuseColor ¶
func (g GLKEffectPropertyLight) SetDiffuseColor(value GLKVector4)
func (GLKEffectPropertyLight) SetEnabled ¶
func (g GLKEffectPropertyLight) SetEnabled(value uint8)
func (GLKEffectPropertyLight) SetLinearAttenuation ¶
func (g GLKEffectPropertyLight) SetLinearAttenuation(value unsafe.Pointer)
func (GLKEffectPropertyLight) SetPosition ¶
func (g GLKEffectPropertyLight) SetPosition(value GLKVector4)
func (GLKEffectPropertyLight) SetQuadraticAttenuation ¶
func (g GLKEffectPropertyLight) SetQuadraticAttenuation(value unsafe.Pointer)
func (GLKEffectPropertyLight) SetSpecularColor ¶
func (g GLKEffectPropertyLight) SetSpecularColor(value GLKVector4)
func (GLKEffectPropertyLight) SetSpotCutoff ¶
func (g GLKEffectPropertyLight) SetSpotCutoff(value unsafe.Pointer)
func (GLKEffectPropertyLight) SetSpotDirection ¶
func (g GLKEffectPropertyLight) SetSpotDirection(value GLKVector3)
func (GLKEffectPropertyLight) SetSpotExponent ¶
func (g GLKEffectPropertyLight) SetSpotExponent(value unsafe.Pointer)
func (GLKEffectPropertyLight) SetTransform ¶
func (g GLKEffectPropertyLight) SetTransform(value IGLKEffectPropertyTransform)
func (GLKEffectPropertyLight) SpecularColor ¶
func (g GLKEffectPropertyLight) SpecularColor() GLKVector4
The specular portion of the light.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/specularColor
func (GLKEffectPropertyLight) SpotCutoff ¶
func (g GLKEffectPropertyLight) SpotCutoff() unsafe.Pointer
The angle in degrees where the spotlight is cut off.
Discussion ¶
If the `w` component of the position is not equal to `0.0`, the value of the GLKEffectPropertyLight.SpotCutoff property determines whether the light is a point light or a spotlight. A cutoff value of `180.0` indicates that the light is a point light; for a point light, the GLKEffectPropertyLight.SpotDirection and GLKEffectPropertyLight.SpotExponent properties are ignored. Otherwise, the GLKEffectPropertyLight.SpotCutoff property represents the maximum angle at which the light contributes lighting to the scene. The angle is measured between the vector provided by the GLKEffectPropertyLight.SpotDirection property and a vector drawn from the light’s position to the point being lit. If the angle exceeds this amount, then the light contributes no light to the scene.
The default value is `180.0`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/spotCutoff
func (GLKEffectPropertyLight) SpotDirection ¶
func (g GLKEffectPropertyLight) SpotDirection() GLKVector3
A vector indicating the direction the spotlight is projecting.
Discussion ¶
The default direction is `[0.0, 0.0, -1.0]`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/spotDirection
func (GLKEffectPropertyLight) SpotExponent ¶
func (g GLKEffectPropertyLight) SpotExponent() unsafe.Pointer
A value indicating how focused the spotlight is.
Discussion ¶
The higher the value stored in the GLKEffectPropertyLight.SpotExponent property, the tighter the focus of the spotlight. The default value is `0.0`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/spotExponent
func (GLKEffectPropertyLight) Transform ¶
func (g GLKEffectPropertyLight) Transform() IGLKEffectPropertyTransform
A transform applied to the light’s position and direction before calculating the contribution of the light.
Discussion ¶
The default value is the identity matrix.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight/transform
type GLKEffectPropertyLightClass ¶
type GLKEffectPropertyLightClass struct {
// contains filtered or unexported fields
}
func GetGLKEffectPropertyLightClass ¶
func GetGLKEffectPropertyLightClass() GLKEffectPropertyLightClass
GetGLKEffectPropertyLightClass returns the class object for GLKEffectPropertyLight.
func (GLKEffectPropertyLightClass) Alloc ¶
func (gc GLKEffectPropertyLightClass) Alloc() GLKEffectPropertyLight
Alloc allocates memory for a new instance of the class.
func (GLKEffectPropertyLightClass) Class ¶
func (gc GLKEffectPropertyLightClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKEffectPropertyMaterial ¶
type GLKEffectPropertyMaterial struct {
GLKEffectProperty
}
Surface appearance properties for use in GLKit rendering effects.
Overview ¶
The GLKEffectPropertyMaterial class defines properties used to configure the characteristics of the surface being lit. The material properties for an effect interact with light properties on the same effect to determine how that surface is lit within the scene. The behavior of this class matches the material properties and lighting calculations defined in the OpenGL ES 1.1 specification.
Material Properties ¶
- GLKEffectPropertyMaterial.AmbientColor: The ambient color of the material.
- GLKEffectPropertyMaterial.SetAmbientColor
- GLKEffectPropertyMaterial.DiffuseColor: The diffuse color of the material.
- GLKEffectPropertyMaterial.SetDiffuseColor
- GLKEffectPropertyMaterial.EmissiveColor: The emissive color of the material.
- GLKEffectPropertyMaterial.SetEmissiveColor
- GLKEffectPropertyMaterial.Shininess: The shininess of the material, used when calculating specular lighting effects.
- GLKEffectPropertyMaterial.SetShininess
- GLKEffectPropertyMaterial.SpecularColor: The specular color of the material.
- GLKEffectPropertyMaterial.SetSpecularColor
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyMaterial
func GLKEffectPropertyMaterialFromID ¶
func GLKEffectPropertyMaterialFromID(id objc.ID) GLKEffectPropertyMaterial
GLKEffectPropertyMaterialFromID constructs a GLKEffectPropertyMaterial from an objc.ID.
Surface appearance properties for use in GLKit rendering effects.
func NewGLKEffectPropertyMaterial ¶
func NewGLKEffectPropertyMaterial() GLKEffectPropertyMaterial
NewGLKEffectPropertyMaterial creates a new GLKEffectPropertyMaterial instance.
func (GLKEffectPropertyMaterial) AmbientColor ¶
func (g GLKEffectPropertyMaterial) AmbientColor() GLKVector4
The ambient color of the material.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyMaterial/ambientColor
func (GLKEffectPropertyMaterial) Autorelease ¶
func (g GLKEffectPropertyMaterial) Autorelease() GLKEffectPropertyMaterial
Autorelease adds the receiver to the current autorelease pool.
func (GLKEffectPropertyMaterial) DiffuseColor ¶
func (g GLKEffectPropertyMaterial) DiffuseColor() GLKVector4
The diffuse color of the material.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyMaterial/diffuseColor
func (GLKEffectPropertyMaterial) EmissiveColor ¶
func (g GLKEffectPropertyMaterial) EmissiveColor() GLKVector4
The emissive color of the material.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyMaterial/emissiveColor
func (GLKEffectPropertyMaterial) Init ¶
func (g GLKEffectPropertyMaterial) Init() GLKEffectPropertyMaterial
Init initializes the instance.
func (GLKEffectPropertyMaterial) SetAmbientColor ¶
func (g GLKEffectPropertyMaterial) SetAmbientColor(value GLKVector4)
func (GLKEffectPropertyMaterial) SetDiffuseColor ¶
func (g GLKEffectPropertyMaterial) SetDiffuseColor(value GLKVector4)
func (GLKEffectPropertyMaterial) SetEmissiveColor ¶
func (g GLKEffectPropertyMaterial) SetEmissiveColor(value GLKVector4)
func (GLKEffectPropertyMaterial) SetShininess ¶
func (g GLKEffectPropertyMaterial) SetShininess(value unsafe.Pointer)
func (GLKEffectPropertyMaterial) SetSpecularColor ¶
func (g GLKEffectPropertyMaterial) SetSpecularColor(value GLKVector4)
func (GLKEffectPropertyMaterial) Shininess ¶
func (g GLKEffectPropertyMaterial) Shininess() unsafe.Pointer
The shininess of the material, used when calculating specular lighting effects.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyMaterial/shininess
func (GLKEffectPropertyMaterial) SpecularColor ¶
func (g GLKEffectPropertyMaterial) SpecularColor() GLKVector4
The specular color of the material.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyMaterial/specularColor
type GLKEffectPropertyMaterialClass ¶
type GLKEffectPropertyMaterialClass struct {
// contains filtered or unexported fields
}
func GetGLKEffectPropertyMaterialClass ¶
func GetGLKEffectPropertyMaterialClass() GLKEffectPropertyMaterialClass
GetGLKEffectPropertyMaterialClass returns the class object for GLKEffectPropertyMaterial.
func (GLKEffectPropertyMaterialClass) Alloc ¶
func (gc GLKEffectPropertyMaterialClass) Alloc() GLKEffectPropertyMaterial
Alloc allocates memory for a new instance of the class.
func (GLKEffectPropertyMaterialClass) Class ¶
func (gc GLKEffectPropertyMaterialClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKEffectPropertyPrvPtr ¶
type GLKEffectPropertyPrvPtr = uintptr
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyPrvPtr
type GLKEffectPropertyTexture ¶
type GLKEffectPropertyTexture struct {
GLKEffectProperty
}
Texture drawing parameters for use in GLKit rendering effects.
Overview ¶
The GLKEffectPropertyTexture class defines properties that are used to configure an OpenGL texturing operation. The texturing operation combines an input color and a color sampled from the texture and outputs a new color to the next stage of calculations. The GLKEffectPropertyTexture.EnvMode property determines the function used to calculate the output color from the two input colors.
If an effect only includes a single texture property, then the input color is the lighting color calculated by the lighting stage of the graphics pipeline. An effect can also include multiple GLKEffectPropertyTexture objects. When an effect includes multiple properties, the first texture stage uses the lighting color as the first input color. Each texture stage after that uses the output of the previous stage as the input color.
Configuring Texture Properties ¶
- GLKEffectPropertyTexture.Enabled: A Boolean value that indicates whether this texture is used to texture drawn primitives.
- GLKEffectPropertyTexture.SetEnabled
- GLKEffectPropertyTexture.EnvMode: The mode the texture uses to compute its output fragment color. See GLKTextureEnvMode(<https://developer.apple.com/documentation/GLKit/GLKTextureEnvMode>).
- GLKEffectPropertyTexture.SetEnvMode
- GLKEffectPropertyTexture.Name: The OpenGL name for the texture being sampled by this texture stage.
- GLKEffectPropertyTexture.SetName
- GLKEffectPropertyTexture.Target: The kind of texture pointed to by the texture stage. See GLKTextureTarget(<https://developer.apple.com/documentation/GLKit/GLKTextureTarget>).
- GLKEffectPropertyTexture.SetTarget
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTexture
func GLKEffectPropertyTextureFromID ¶
func GLKEffectPropertyTextureFromID(id objc.ID) GLKEffectPropertyTexture
GLKEffectPropertyTextureFromID constructs a GLKEffectPropertyTexture from an objc.ID.
Texture drawing parameters for use in GLKit rendering effects.
func NewGLKEffectPropertyTexture ¶
func NewGLKEffectPropertyTexture() GLKEffectPropertyTexture
NewGLKEffectPropertyTexture creates a new GLKEffectPropertyTexture instance.
func (GLKEffectPropertyTexture) Autorelease ¶
func (g GLKEffectPropertyTexture) Autorelease() GLKEffectPropertyTexture
Autorelease adds the receiver to the current autorelease pool.
func (GLKEffectPropertyTexture) Enabled ¶
func (g GLKEffectPropertyTexture) Enabled() uint8
A Boolean value that indicates whether this texture is used to texture drawn primitives.
Discussion ¶
If the value is `GL_TRUE`, then the texture is applied to the primitive. If the value is `GL_FALSE`, the texture is skipped. The default value is `GL_TRUE`.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTexture/enabled
func (GLKEffectPropertyTexture) EnvMode ¶
func (g GLKEffectPropertyTexture) EnvMode() GLKTextureEnvMode
The mode the texture uses to compute its output fragment color. See GLKTextureEnvMode.
Discussion ¶
The default value is GLKTextureEnvMode.modulate.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTexture/envMode
func (GLKEffectPropertyTexture) Init ¶
func (g GLKEffectPropertyTexture) Init() GLKEffectPropertyTexture
Init initializes the instance.
func (GLKEffectPropertyTexture) Name ¶
func (g GLKEffectPropertyTexture) Name() uint32
The OpenGL name for the texture being sampled by this texture stage.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTexture/name
func (GLKEffectPropertyTexture) SetEnabled ¶
func (g GLKEffectPropertyTexture) SetEnabled(value uint8)
func (GLKEffectPropertyTexture) SetEnvMode ¶
func (g GLKEffectPropertyTexture) SetEnvMode(value GLKTextureEnvMode)
func (GLKEffectPropertyTexture) SetName ¶
func (g GLKEffectPropertyTexture) SetName(value uint32)
func (GLKEffectPropertyTexture) SetTarget ¶
func (g GLKEffectPropertyTexture) SetTarget(value GLKTextureTarget)
func (GLKEffectPropertyTexture) Target ¶
func (g GLKEffectPropertyTexture) Target() GLKTextureTarget
The kind of texture pointed to by the texture stage. See GLKTextureTarget.
Discussion ¶
The default value is GLKTextureTarget.target2D.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTexture/target
type GLKEffectPropertyTextureClass ¶
type GLKEffectPropertyTextureClass struct {
// contains filtered or unexported fields
}
func GetGLKEffectPropertyTextureClass ¶
func GetGLKEffectPropertyTextureClass() GLKEffectPropertyTextureClass
GetGLKEffectPropertyTextureClass returns the class object for GLKEffectPropertyTexture.
func (GLKEffectPropertyTextureClass) Alloc ¶
func (gc GLKEffectPropertyTextureClass) Alloc() GLKEffectPropertyTexture
Alloc allocates memory for a new instance of the class.
func (GLKEffectPropertyTextureClass) Class ¶
func (gc GLKEffectPropertyTextureClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKEffectPropertyTransform ¶
type GLKEffectPropertyTransform struct {
GLKEffectProperty
}
Coordinate transform information for use in GLKit rendering effects.
Overview ¶
The GLKEffectPropertyTransform class defines properties that provide the coordinate transformations to be performed when rendering the effect.
Configuring Modelview Properties ¶
- GLKEffectPropertyTransform.ModelviewMatrix: The matrix used to transform position coordinates from world space to eye space.
- GLKEffectPropertyTransform.SetModelviewMatrix
- GLKEffectPropertyTransform.NormalMatrix: The matrix used to transform normal coordinates from world space to eye space.
Configuring the Projection Matrix ¶
- GLKEffectPropertyTransform.ProjectionMatrix: The matrix used to transform position coordinates from eye space to projection space.
- GLKEffectPropertyTransform.SetProjectionMatrix
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTransform
func GLKEffectPropertyTransformFromID ¶
func GLKEffectPropertyTransformFromID(id objc.ID) GLKEffectPropertyTransform
GLKEffectPropertyTransformFromID constructs a GLKEffectPropertyTransform from an objc.ID.
Coordinate transform information for use in GLKit rendering effects.
func NewGLKEffectPropertyTransform ¶
func NewGLKEffectPropertyTransform() GLKEffectPropertyTransform
NewGLKEffectPropertyTransform creates a new GLKEffectPropertyTransform instance.
func (GLKEffectPropertyTransform) Autorelease ¶
func (g GLKEffectPropertyTransform) Autorelease() GLKEffectPropertyTransform
Autorelease adds the receiver to the current autorelease pool.
func (GLKEffectPropertyTransform) Init ¶
func (g GLKEffectPropertyTransform) Init() GLKEffectPropertyTransform
Init initializes the instance.
func (GLKEffectPropertyTransform) ModelviewMatrix ¶
func (g GLKEffectPropertyTransform) ModelviewMatrix() GLKMatrix4
The matrix used to transform position coordinates from world space to eye space.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTransform/modelviewMatrix
func (GLKEffectPropertyTransform) NormalMatrix ¶
func (g GLKEffectPropertyTransform) NormalMatrix() GLKMatrix3
The matrix used to transform normal coordinates from world space to eye space.
Discussion ¶
The normal matrix is derived from the GLKEffectPropertyTransform.ModelviewMatrix property and is automatically calculated when needed.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTransform/normalMatrix
func (GLKEffectPropertyTransform) ProjectionMatrix ¶
func (g GLKEffectPropertyTransform) ProjectionMatrix() GLKMatrix4
The matrix used to transform position coordinates from eye space to projection space.
Discussion ¶
Convenience functions for creating perspective and orthographic projection matrices can be found in GLKMatrix4.
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTransform/projectionMatrix
func (GLKEffectPropertyTransform) SetModelviewMatrix ¶
func (g GLKEffectPropertyTransform) SetModelviewMatrix(value GLKMatrix4)
func (GLKEffectPropertyTransform) SetProjectionMatrix ¶
func (g GLKEffectPropertyTransform) SetProjectionMatrix(value GLKMatrix4)
type GLKEffectPropertyTransformClass ¶
type GLKEffectPropertyTransformClass struct {
// contains filtered or unexported fields
}
func GetGLKEffectPropertyTransformClass ¶
func GetGLKEffectPropertyTransformClass() GLKEffectPropertyTransformClass
GetGLKEffectPropertyTransformClass returns the class object for GLKEffectPropertyTransform.
func (GLKEffectPropertyTransformClass) Alloc ¶
func (gc GLKEffectPropertyTransformClass) Alloc() GLKEffectPropertyTransform
Alloc allocates memory for a new instance of the class.
func (GLKEffectPropertyTransformClass) Class ¶
func (gc GLKEffectPropertyTransformClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
It panics if GLKMatrixStackGetMatrix2 is unavailable at run time; use TryGLKMatrixStackGetMatrix2 to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix2(_:)
func TryGLKMatrixStackGetMatrix2 ¶
func TryGLKMatrixStackGetMatrix2(stack GLKMatrixStackRef) (GLKMatrix2, error)
TryGLKMatrixStackGetMatrix2 is like GLKMatrixStackGetMatrix2 but returns an error instead of panicking if GLKMatrixStackGetMatrix2 is unavailable at run time.
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.
It panics if GLKMatrix3Invert is unavailable at run time; use TryGLKMatrix3Invert to get an error instead.
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.
It panics if GLKMatrix3InvertAndTranspose is unavailable at run time; use TryGLKMatrix3InvertAndTranspose to get an error instead.
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.
It panics if GLKMatrixStackGetMatrix3 is unavailable at run time; use TryGLKMatrixStackGetMatrix3 to get an error instead.
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.
It panics if GLKMatrixStackGetMatrix3Inverse is unavailable at run time; use TryGLKMatrixStackGetMatrix3Inverse to get an error instead.
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.
It panics if GLKMatrixStackGetMatrix3InverseTranspose is unavailable at run time; use TryGLKMatrixStackGetMatrix3InverseTranspose to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix3InverseTranspose(_:)
func TryGLKMatrix3Invert ¶
func TryGLKMatrix3Invert(matrix GLKMatrix3, isInvertible *bool) (GLKMatrix3, error)
TryGLKMatrix3Invert is like GLKMatrix3Invert but returns an error instead of panicking if GLKMatrix3Invert is unavailable at run time.
func TryGLKMatrix3InvertAndTranspose ¶
func TryGLKMatrix3InvertAndTranspose(matrix GLKMatrix3, isInvertible *bool) (GLKMatrix3, error)
TryGLKMatrix3InvertAndTranspose is like GLKMatrix3InvertAndTranspose but returns an error instead of panicking if GLKMatrix3InvertAndTranspose is unavailable at run time.
func TryGLKMatrixStackGetMatrix3 ¶
func TryGLKMatrixStackGetMatrix3(stack GLKMatrixStackRef) (GLKMatrix3, error)
TryGLKMatrixStackGetMatrix3 is like GLKMatrixStackGetMatrix3 but returns an error instead of panicking if GLKMatrixStackGetMatrix3 is unavailable at run time.
func TryGLKMatrixStackGetMatrix3Inverse ¶
func TryGLKMatrixStackGetMatrix3Inverse(stack GLKMatrixStackRef) (GLKMatrix3, error)
TryGLKMatrixStackGetMatrix3Inverse is like GLKMatrixStackGetMatrix3Inverse but returns an error instead of panicking if GLKMatrixStackGetMatrix3Inverse is unavailable at run time.
func TryGLKMatrixStackGetMatrix3InverseTranspose ¶
func TryGLKMatrixStackGetMatrix3InverseTranspose(stack GLKMatrixStackRef) (GLKMatrix3, error)
TryGLKMatrixStackGetMatrix3InverseTranspose is like GLKMatrixStackGetMatrix3InverseTranspose but returns an error instead of panicking if GLKMatrixStackGetMatrix3InverseTranspose is unavailable at run time.
type GLKMatrix4 ¶
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.
It panics if GLKMatrix4Invert is unavailable at run time; use TryGLKMatrix4Invert to get an error instead.
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.
It panics if GLKMatrix4InvertAndTranspose is unavailable at run time; use TryGLKMatrix4InvertAndTranspose to get an error instead.
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.
It panics if GLKMatrixStackGetMatrix4 is unavailable at run time; use TryGLKMatrixStackGetMatrix4 to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix4(_:)
func GLKMatrixStackGetMatrix4Inverse ¶
func GLKMatrixStackGetMatrix4Inverse(stack GLKMatrixStackRef) GLKMatrix4
GLKMatrixStackGetMatrix4Inverse returns the inverse of the top matrix.
It panics if GLKMatrixStackGetMatrix4Inverse is unavailable at run time; use TryGLKMatrixStackGetMatrix4Inverse to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix4Inverse(_:)
func GLKMatrixStackGetMatrix4InverseTranspose ¶
func GLKMatrixStackGetMatrix4InverseTranspose(stack GLKMatrixStackRef) GLKMatrix4
GLKMatrixStackGetMatrix4InverseTranspose returns the inverse transpose of the top matrix.
It panics if GLKMatrixStackGetMatrix4InverseTranspose is unavailable at run time; use TryGLKMatrixStackGetMatrix4InverseTranspose to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackGetMatrix4InverseTranspose(_:)
func TryGLKMatrix4Invert ¶
func TryGLKMatrix4Invert(matrix GLKMatrix4, isInvertible *bool) (GLKMatrix4, error)
TryGLKMatrix4Invert is like GLKMatrix4Invert but returns an error instead of panicking if GLKMatrix4Invert is unavailable at run time.
func TryGLKMatrix4InvertAndTranspose ¶
func TryGLKMatrix4InvertAndTranspose(matrix GLKMatrix4, isInvertible *bool) (GLKMatrix4, error)
TryGLKMatrix4InvertAndTranspose is like GLKMatrix4InvertAndTranspose but returns an error instead of panicking if GLKMatrix4InvertAndTranspose is unavailable at run time.
func TryGLKMatrixStackGetMatrix4 ¶
func TryGLKMatrixStackGetMatrix4(stack GLKMatrixStackRef) (GLKMatrix4, error)
TryGLKMatrixStackGetMatrix4 is like GLKMatrixStackGetMatrix4 but returns an error instead of panicking if GLKMatrixStackGetMatrix4 is unavailable at run time.
func TryGLKMatrixStackGetMatrix4Inverse ¶
func TryGLKMatrixStackGetMatrix4Inverse(stack GLKMatrixStackRef) (GLKMatrix4, error)
TryGLKMatrixStackGetMatrix4Inverse is like GLKMatrixStackGetMatrix4Inverse but returns an error instead of panicking if GLKMatrixStackGetMatrix4Inverse is unavailable at run time.
func TryGLKMatrixStackGetMatrix4InverseTranspose ¶
func TryGLKMatrixStackGetMatrix4InverseTranspose(stack GLKMatrixStackRef) (GLKMatrix4, error)
TryGLKMatrixStackGetMatrix4InverseTranspose is like GLKMatrixStackGetMatrix4InverseTranspose but returns an error instead of panicking if GLKMatrixStackGetMatrix4InverseTranspose is unavailable at run time.
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.
It panics if GLKMatrixStackCreate is unavailable at run time; use TryGLKMatrixStackCreate to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMatrixStackCreate(_:)
func TryGLKMatrixStackCreate ¶
func TryGLKMatrixStackCreate(alloc corefoundation.CFAllocatorRef) (GLKMatrixStackRef, error)
TryGLKMatrixStackCreate is like GLKMatrixStackCreate but returns an error instead of panicking if GLKMatrixStackCreate is unavailable at run time.
type GLKMesh ¶
type GLKMesh struct {
objectivec.Object
}
Instance Properties ¶
See: https://developer.apple.com/documentation/GLKit/GLKMesh
func GLKMeshFromID ¶
GLKMeshFromID constructs a GLKMesh from an objc.ID.
func NewGLKMeshWithMeshError ¶
func NewGLKMeshWithMeshError(mesh objectivec.IObject) (GLKMesh, error)
See: https://developer.apple.com/documentation/GLKit/GLKMesh/init(mesh:)
func (GLKMesh) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (GLKMesh) Name ¶
See: https://developer.apple.com/documentation/GLKit/GLKMesh/name
func (GLKMesh) Submeshes ¶
func (g GLKMesh) Submeshes() []GLKSubmesh
See: https://developer.apple.com/documentation/GLKit/GLKMesh/submeshes
func (GLKMesh) VertexBuffers ¶
func (g GLKMesh) VertexBuffers() []GLKMeshBuffer
See: https://developer.apple.com/documentation/GLKit/GLKMesh/vertexBuffers
func (GLKMesh) VertexCount ¶
See: https://developer.apple.com/documentation/GLKit/GLKMesh/vertexCount
type GLKMeshBuffer ¶
type GLKMeshBuffer struct {
objectivec.Object
}
Instance Properties ¶
- GLKMeshBuffer.Allocator
- GLKMeshBuffer.GlBufferName
- GLKMeshBuffer.Length
- GLKMeshBuffer.Offset
- GLKMeshBuffer.Type
See: https://developer.apple.com/documentation/GLKit/GLKMeshBuffer
func GLKMeshBufferFromID ¶
func GLKMeshBufferFromID(id objc.ID) GLKMeshBuffer
GLKMeshBufferFromID constructs a GLKMeshBuffer from an objc.ID.
func NewGLKMeshBuffer ¶
func NewGLKMeshBuffer() GLKMeshBuffer
NewGLKMeshBuffer creates a new GLKMeshBuffer instance.
func (GLKMeshBuffer) Allocator ¶
func (g GLKMeshBuffer) Allocator() IGLKMeshBufferAllocator
See: https://developer.apple.com/documentation/GLKit/GLKMeshBuffer/allocator
func (GLKMeshBuffer) Autorelease ¶
func (g GLKMeshBuffer) Autorelease() GLKMeshBuffer
Autorelease adds the receiver to the current autorelease pool.
func (GLKMeshBuffer) GlBufferName ¶
func (g GLKMeshBuffer) GlBufferName() uint32
See: https://developer.apple.com/documentation/GLKit/GLKMeshBuffer/glBufferName
func (GLKMeshBuffer) Init ¶
func (g GLKMeshBuffer) Init() GLKMeshBuffer
Init initializes the instance.
func (GLKMeshBuffer) Length ¶
func (g GLKMeshBuffer) Length() uint
See: https://developer.apple.com/documentation/GLKit/GLKMeshBuffer/length
func (GLKMeshBuffer) Offset ¶
func (g GLKMeshBuffer) Offset() uint
See: https://developer.apple.com/documentation/GLKit/GLKMeshBuffer/offset
func (GLKMeshBuffer) Type ¶
func (g GLKMeshBuffer) Type() uint
See: https://developer.apple.com/documentation/GLKit/GLKMeshBuffer/type
type GLKMeshBufferAllocator ¶
type GLKMeshBufferAllocator struct {
objectivec.Object
}
See: https://developer.apple.com/documentation/GLKit/GLKMeshBufferAllocator
func GLKMeshBufferAllocatorFromID ¶
func GLKMeshBufferAllocatorFromID(id objc.ID) GLKMeshBufferAllocator
GLKMeshBufferAllocatorFromID constructs a GLKMeshBufferAllocator from an objc.ID.
func NewGLKMeshBufferAllocator ¶
func NewGLKMeshBufferAllocator() GLKMeshBufferAllocator
NewGLKMeshBufferAllocator creates a new GLKMeshBufferAllocator instance.
func (GLKMeshBufferAllocator) Autorelease ¶
func (g GLKMeshBufferAllocator) Autorelease() GLKMeshBufferAllocator
Autorelease adds the receiver to the current autorelease pool.
func (GLKMeshBufferAllocator) Init ¶
func (g GLKMeshBufferAllocator) Init() GLKMeshBufferAllocator
Init initializes the instance.
type GLKMeshBufferAllocatorClass ¶
type GLKMeshBufferAllocatorClass struct {
// contains filtered or unexported fields
}
func GetGLKMeshBufferAllocatorClass ¶
func GetGLKMeshBufferAllocatorClass() GLKMeshBufferAllocatorClass
GetGLKMeshBufferAllocatorClass returns the class object for GLKMeshBufferAllocator.
func (GLKMeshBufferAllocatorClass) Alloc ¶
func (gc GLKMeshBufferAllocatorClass) Alloc() GLKMeshBufferAllocator
Alloc allocates memory for a new instance of the class.
func (GLKMeshBufferAllocatorClass) Class ¶
func (gc GLKMeshBufferAllocatorClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKMeshBufferClass ¶
type GLKMeshBufferClass struct {
// contains filtered or unexported fields
}
func GetGLKMeshBufferClass ¶
func GetGLKMeshBufferClass() GLKMeshBufferClass
GetGLKMeshBufferClass returns the class object for GLKMeshBuffer.
func (GLKMeshBufferClass) Alloc ¶
func (gc GLKMeshBufferClass) Alloc() GLKMeshBuffer
Alloc allocates memory for a new instance of the class.
func (GLKMeshBufferClass) Class ¶
func (gc GLKMeshBufferClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKMeshClass ¶
type GLKMeshClass struct {
// contains filtered or unexported fields
}
func GetGLKMeshClass ¶
func GetGLKMeshClass() GLKMeshClass
GetGLKMeshClass returns the class object for GLKMesh.
func (GLKMeshClass) Alloc ¶
func (gc GLKMeshClass) Alloc() GLKMesh
Alloc allocates memory for a new instance of the class.
func (GLKMeshClass) Class ¶
func (gc GLKMeshClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 ¶
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.
It panics if GLKQuaternionMakeWithMatrix3 is unavailable at run time; use TryGLKQuaternionMakeWithMatrix3 to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKQuaternionMakeWithMatrix3(_:)
func GLKQuaternionMakeWithMatrix4 ¶
func GLKQuaternionMakeWithMatrix4(matrix GLKMatrix4) GLKQuaternion
GLKQuaternionMakeWithMatrix4 creates a quaternion from a rotation matrix.
It panics if GLKQuaternionMakeWithMatrix4 is unavailable at run time; use TryGLKQuaternionMakeWithMatrix4 to get an error instead.
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.
It panics if GLKQuaternionSlerp is unavailable at run time; use TryGLKQuaternionSlerp to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKQuaternionSlerp(_:_:_:)
func TryGLKQuaternionMakeWithMatrix3 ¶
func TryGLKQuaternionMakeWithMatrix3(matrix GLKMatrix3) (GLKQuaternion, error)
TryGLKQuaternionMakeWithMatrix3 is like GLKQuaternionMakeWithMatrix3 but returns an error instead of panicking if GLKQuaternionMakeWithMatrix3 is unavailable at run time.
func TryGLKQuaternionMakeWithMatrix4 ¶
func TryGLKQuaternionMakeWithMatrix4(matrix GLKMatrix4) (GLKQuaternion, error)
TryGLKQuaternionMakeWithMatrix4 is like GLKQuaternionMakeWithMatrix4 but returns an error instead of panicking if GLKQuaternionMakeWithMatrix4 is unavailable at run time.
func TryGLKQuaternionSlerp ¶
func TryGLKQuaternionSlerp(quaternionStart GLKQuaternion, quaternionEnd GLKQuaternion, t float32) (GLKQuaternion, error)
TryGLKQuaternionSlerp is like GLKQuaternionSlerp but returns an error instead of panicking if GLKQuaternionSlerp is unavailable at run time.
type GLKReflectionMapEffect ¶
type GLKReflectionMapEffect struct {
GLKBaseEffect
}
A lighting and shading system that supports reflection mapping for use in shader-based OpenGL rendering.
Overview ¶
In addition to any of the properties provided by the GLKBaseEffect class, your application must also configure the properties on the reflection map. The default value of the GLKBaseEffect.TextureOrder property provided by the base effect is modified to include the reflection map as a final texturing stage; your application can modify the value of that property to change the order in which texturing occurs.
The reflection map effect is calculated in accordance to section 2.11.4 of the OpenGL 2.1 specification `GL_REFLECTION_MAP` glTexGen() mode. It requires a cube map texture to define the enclosing envelope from which to reflection map the scene.
Effect Properties ¶
- GLKReflectionMapEffect.TextureCubeMap: The texture map to apply in the reflection stage.
- GLKReflectionMapEffect.Matrix: The reflection matrix to apply to the normals of the submitted vertices.
- GLKReflectionMapEffect.SetMatrix
See: https://developer.apple.com/documentation/GLKit/GLKReflectionMapEffect
func GLKReflectionMapEffectFromID ¶
func GLKReflectionMapEffectFromID(id objc.ID) GLKReflectionMapEffect
GLKReflectionMapEffectFromID constructs a GLKReflectionMapEffect from an objc.ID.
A lighting and shading system that supports reflection mapping for use in shader-based OpenGL rendering.
func NewGLKReflectionMapEffect ¶
func NewGLKReflectionMapEffect() GLKReflectionMapEffect
NewGLKReflectionMapEffect creates a new GLKReflectionMapEffect instance.
func (GLKReflectionMapEffect) Autorelease ¶
func (g GLKReflectionMapEffect) Autorelease() GLKReflectionMapEffect
Autorelease adds the receiver to the current autorelease pool.
func (GLKReflectionMapEffect) Init ¶
func (g GLKReflectionMapEffect) Init() GLKReflectionMapEffect
Init initializes the instance.
func (GLKReflectionMapEffect) Matrix ¶
func (g GLKReflectionMapEffect) Matrix() GLKMatrix3
The reflection matrix to apply to the normals of the submitted vertices.
See: https://developer.apple.com/documentation/GLKit/GLKReflectionMapEffect/matrix
func (GLKReflectionMapEffect) PrepareToDraw ¶
func (g GLKReflectionMapEffect) 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()
func (GLKReflectionMapEffect) SetMatrix ¶
func (g GLKReflectionMapEffect) SetMatrix(value GLKMatrix3)
func (GLKReflectionMapEffect) TextureCubeMap ¶
func (g GLKReflectionMapEffect) TextureCubeMap() IGLKEffectPropertyTexture
The texture map to apply in the reflection stage.
Discussion ¶
Your application should create a complete texture cube map in its initialization code. Then, assign the name of this texture to the GLKReflectionMapEffect.TextureCubeMap property.
See: https://developer.apple.com/documentation/GLKit/GLKReflectionMapEffect/textureCubeMap
type GLKReflectionMapEffectClass ¶
type GLKReflectionMapEffectClass struct {
// contains filtered or unexported fields
}
func GetGLKReflectionMapEffectClass ¶
func GetGLKReflectionMapEffectClass() GLKReflectionMapEffectClass
GetGLKReflectionMapEffectClass returns the class object for GLKReflectionMapEffect.
func (GLKReflectionMapEffectClass) Alloc ¶
func (gc GLKReflectionMapEffectClass) Alloc() GLKReflectionMapEffect
Alloc allocates memory for a new instance of the class.
func (GLKReflectionMapEffectClass) Class ¶
func (gc GLKReflectionMapEffectClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKSkyboxEffect ¶
type GLKSkyboxEffect struct {
objectivec.Object
}
A simple skybox visual effect for use in shader-based OpenGL rendering.
Overview ¶
The GLKSkyboxEffect provides a standard skybox effect for your application. Unlike the GLKBaseEffect class, the skybox does not require your application to configure and submit vertex data. Instead, it creates its own vertex data based on the configuration data you supply.
At initialization time, your application first creates a compatible context and makes it current. Then, it creates new skybox effect, configures its properties, and calls its prepareToDraw() method. Binding the effect causes a shader to be compiled and bound to the current context.
At rendering time, your application calls the effect’s prepareToDraw() method to prepare the effect and then calls its draw() method to draw the sky box.
Naming the Effect ¶
- GLKSkyboxEffect.Label: A string used to name your effect.
- GLKSkyboxEffect.SetLabel
Configuring the Skybox ¶
- GLKSkyboxEffect.TextureCubeMap: The texture to apply to the skybox.
- GLKSkyboxEffect.Center: The center of the skybox.
- GLKSkyboxEffect.SetCenter
- GLKSkyboxEffect.XSize: The width of the skybox.
- GLKSkyboxEffect.SetXSize
- GLKSkyboxEffect.YSize: The height of the skybox.
- GLKSkyboxEffect.SetYSize
- GLKSkyboxEffect.ZSize: The depth of the skybox.
- GLKSkyboxEffect.SetZSize
Setting the Skybox Transform ¶
- GLKSkyboxEffect.Transform: The transform applied before drawing the skybox.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect
func GLKSkyboxEffectFromID ¶
func GLKSkyboxEffectFromID(id objc.ID) GLKSkyboxEffect
GLKSkyboxEffectFromID constructs a GLKSkyboxEffect from an objc.ID.
A simple skybox visual effect for use in shader-based OpenGL rendering.
func NewGLKSkyboxEffect ¶
func NewGLKSkyboxEffect() GLKSkyboxEffect
NewGLKSkyboxEffect creates a new GLKSkyboxEffect instance.
func (GLKSkyboxEffect) Autorelease ¶
func (g GLKSkyboxEffect) Autorelease() GLKSkyboxEffect
Autorelease adds the receiver to the current autorelease pool.
func (GLKSkyboxEffect) Center ¶
func (g GLKSkyboxEffect) Center() GLKVector3
The center of the skybox.
Discussion ¶
The property holds the `[x,y,z]` coordinates of the center of the skybox.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect/center
func (GLKSkyboxEffect) Init ¶
func (g GLKSkyboxEffect) Init() GLKSkyboxEffect
Init initializes the instance.
func (GLKSkyboxEffect) Label ¶
func (g GLKSkyboxEffect) Label() string
A string used to name your effect.
Discussion ¶
The name of the effect isn’t used directly by GLKit, but is printed when, for example, you log the object to the console via the https://developer.apple.com/documentation/foundation/1395275-nslog function.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect/label
func (GLKSkyboxEffect) PrepareToDraw ¶
func (g GLKSkyboxEffect) 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()
func (GLKSkyboxEffect) SetCenter ¶
func (g GLKSkyboxEffect) SetCenter(value GLKVector3)
func (GLKSkyboxEffect) SetLabel ¶
func (g GLKSkyboxEffect) SetLabel(value string)
func (GLKSkyboxEffect) SetXSize ¶
func (g GLKSkyboxEffect) SetXSize(value unsafe.Pointer)
func (GLKSkyboxEffect) SetYSize ¶
func (g GLKSkyboxEffect) SetYSize(value unsafe.Pointer)
func (GLKSkyboxEffect) SetZSize ¶
func (g GLKSkyboxEffect) SetZSize(value unsafe.Pointer)
func (GLKSkyboxEffect) TextureCubeMap ¶
func (g GLKSkyboxEffect) TextureCubeMap() IGLKEffectPropertyTexture
The texture to apply to the skybox.
Discussion ¶
Your application should create a complete texture cube map in its initialization code. Then, assign the name of this texture to the GLKSkyboxEffect.TextureCubeMap property of the skybox object.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect/textureCubeMap
func (GLKSkyboxEffect) Transform ¶
func (g GLKSkyboxEffect) Transform() IGLKEffectPropertyTransform
The transform applied before drawing the skybox.
Discussion ¶
Your application uses this transform to set the position and orientation of the camera.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect/transform
func (GLKSkyboxEffect) XSize ¶
func (g GLKSkyboxEffect) XSize() unsafe.Pointer
The width of the skybox.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect/xSize
func (GLKSkyboxEffect) YSize ¶
func (g GLKSkyboxEffect) YSize() unsafe.Pointer
The height of the skybox.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect/ySize
func (GLKSkyboxEffect) ZSize ¶
func (g GLKSkyboxEffect) ZSize() unsafe.Pointer
The depth of the skybox.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect/zSize
type GLKSkyboxEffectClass ¶
type GLKSkyboxEffectClass struct {
// contains filtered or unexported fields
}
func GetGLKSkyboxEffectClass ¶
func GetGLKSkyboxEffectClass() GLKSkyboxEffectClass
GetGLKSkyboxEffectClass returns the class object for GLKSkyboxEffect.
func (GLKSkyboxEffectClass) Alloc ¶
func (gc GLKSkyboxEffectClass) Alloc() GLKSkyboxEffect
Alloc allocates memory for a new instance of the class.
func (GLKSkyboxEffectClass) Class ¶
func (gc GLKSkyboxEffectClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKSubmesh ¶
type GLKSubmesh struct {
objectivec.Object
}
Instance Properties ¶
- GLKSubmesh.ElementBuffer
- GLKSubmesh.ElementCount
- GLKSubmesh.Mesh
- GLKSubmesh.Mode
- GLKSubmesh.Name
- GLKSubmesh.Type
See: https://developer.apple.com/documentation/GLKit/GLKSubmesh
func GLKSubmeshFromID ¶
func GLKSubmeshFromID(id objc.ID) GLKSubmesh
GLKSubmeshFromID constructs a GLKSubmesh from an objc.ID.
func NewGLKSubmesh ¶
func NewGLKSubmesh() GLKSubmesh
NewGLKSubmesh creates a new GLKSubmesh instance.
func (GLKSubmesh) Autorelease ¶
func (g GLKSubmesh) Autorelease() GLKSubmesh
Autorelease adds the receiver to the current autorelease pool.
func (GLKSubmesh) ElementBuffer ¶
func (g GLKSubmesh) ElementBuffer() IGLKMeshBuffer
See: https://developer.apple.com/documentation/GLKit/GLKSubmesh/elementBuffer
func (GLKSubmesh) ElementCount ¶
func (g GLKSubmesh) ElementCount() int32
See: https://developer.apple.com/documentation/GLKit/GLKSubmesh/elementCount
func (GLKSubmesh) Mesh ¶
func (g GLKSubmesh) Mesh() IGLKMesh
See: https://developer.apple.com/documentation/GLKit/GLKSubmesh/mesh
func (GLKSubmesh) Mode ¶
func (g GLKSubmesh) Mode() uint32
See: https://developer.apple.com/documentation/GLKit/GLKSubmesh/mode
func (GLKSubmesh) Name ¶
func (g GLKSubmesh) Name() string
See: https://developer.apple.com/documentation/GLKit/GLKSubmesh/name
func (GLKSubmesh) Type ¶
func (g GLKSubmesh) Type() uint32
See: https://developer.apple.com/documentation/GLKit/GLKSubmesh/type
type GLKSubmeshClass ¶
type GLKSubmeshClass struct {
// contains filtered or unexported fields
}
func GetGLKSubmeshClass ¶
func GetGLKSubmeshClass() GLKSubmeshClass
GetGLKSubmeshClass returns the class object for GLKSubmesh.
func (GLKSubmeshClass) Alloc ¶
func (gc GLKSubmeshClass) Alloc() GLKSubmesh
Alloc allocates memory for a new instance of the class.
func (GLKSubmeshClass) Class ¶
func (gc GLKSubmeshClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 GLKTextureInfo ¶
type GLKTextureInfo struct {
objectivec.Object
}
Information about OpenGL textures created by the GLKTextureLoader class.
Overview ¶
When your app loads textures using the GLKTextureLoader class, the texture loader returns information about the textures using GLKTextureInfo objects. Your app never creates GLKTextureInfo objects directly.
Reading Texture Information ¶
- GLKTextureInfo.Name: The OpenGL context’s name for the texture.
- GLKTextureInfo.Target: The OpenGL binding target for the texture.
- GLKTextureInfo.Height: The height of the loaded texture.
- GLKTextureInfo.Width: The width of the loaded texture.
- GLKTextureInfo.TextureOrigin: The location of the origin in the loaded texture.
- GLKTextureInfo.AlphaState: The state of the alpha component in the loaded texture.
- GLKTextureInfo.ContainsMipmaps: A Boolean value that states whether the loaded texture contains mip maps.
Instance Properties ¶
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo
func GLKTextureInfoFromID ¶
func GLKTextureInfoFromID(id objc.ID) GLKTextureInfo
GLKTextureInfoFromID constructs a GLKTextureInfo from an objc.ID.
Information about OpenGL textures created by the GLKTextureLoader class.
func NewGLKTextureInfo ¶
func NewGLKTextureInfo() GLKTextureInfo
NewGLKTextureInfo creates a new GLKTextureInfo instance.
func (GLKTextureInfo) AlphaState ¶
func (g GLKTextureInfo) AlphaState() GLKTextureInfoAlphaState
The state of the alpha component in the loaded texture.
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/alphaState-swift.property
func (GLKTextureInfo) ArrayLength ¶
func (g GLKTextureInfo) ArrayLength() uint32
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/arrayLength-swift.property
func (GLKTextureInfo) Autorelease ¶
func (g GLKTextureInfo) Autorelease() GLKTextureInfo
Autorelease adds the receiver to the current autorelease pool.
func (GLKTextureInfo) ContainsMipmaps ¶
func (g GLKTextureInfo) ContainsMipmaps() bool
A Boolean value that states whether the loaded texture contains mip maps.
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/containsMipmaps-swift.property
func (GLKTextureInfo) Depth ¶
func (g GLKTextureInfo) Depth() uint32
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/depth-swift.property
func (GLKTextureInfo) Height ¶
func (g GLKTextureInfo) Height() uint32
The height of the loaded texture.
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/height-swift.property
func (GLKTextureInfo) Init ¶
func (g GLKTextureInfo) Init() GLKTextureInfo
Init initializes the instance.
func (GLKTextureInfo) MimapLevelCount ¶
func (g GLKTextureInfo) MimapLevelCount() uint32
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/mimapLevelCount-swift.property
func (GLKTextureInfo) Name ¶
func (g GLKTextureInfo) Name() uint32
The OpenGL context’s name for the texture.
Discussion ¶
Your app uses this identifier whenever it wants to bind the texture to a context.
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/name-swift.property
func (GLKTextureInfo) Target ¶
func (g GLKTextureInfo) Target() uint32
The OpenGL binding target for the texture.
Discussion ¶
Your app uses this property as the target value when it binds the texture to a context.
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/target-swift.property
func (GLKTextureInfo) TextureOrigin ¶
func (g GLKTextureInfo) TextureOrigin() GLKTextureInfoOrigin
The location of the origin in the loaded texture.
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/textureOrigin-swift.property
func (GLKTextureInfo) Width ¶
func (g GLKTextureInfo) Width() uint32
The width of the loaded texture.
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo/width-swift.property
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 GLKTextureInfoClass ¶
type GLKTextureInfoClass struct {
// contains filtered or unexported fields
}
func GetGLKTextureInfoClass ¶
func GetGLKTextureInfoClass() GLKTextureInfoClass
GetGLKTextureInfoClass returns the class object for GLKTextureInfo.
func (GLKTextureInfoClass) Alloc ¶
func (gc GLKTextureInfoClass) Alloc() GLKTextureInfo
Alloc allocates memory for a new instance of the class.
func (GLKTextureInfoClass) Class ¶
func (gc GLKTextureInfoClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type GLKTextureInfoErrorHandler ¶
type GLKTextureInfoErrorHandler = func(*GLKTextureInfo, error)
GLKTextureInfoErrorHandler handles A block to be called when the task completes. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.
Used by:
- [GLKTextureLoader.CubeMapWithContentsOfFileOptionsQueueCompletionHandler]
- [GLKTextureLoader.CubeMapWithContentsOfFilesOptionsQueueCompletionHandler]
- [GLKTextureLoader.CubeMapWithContentsOfURLOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithCGImageOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithContentsOfDataOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithContentsOfFileOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithContentsOfURLOptionsQueueCompletionHandler]
- [GLKTextureLoader.TextureWithNameScaleFactorBundleOptionsQueueCompletionHandler]
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 GLKTextureLoader ¶
type GLKTextureLoader struct {
objectivec.Object
}
A utility class that simplifies loading OpenGL or OpenGL ES texture datas from a variety of image file formats.
Overview ¶
The GLKTextureLoader class can load two-dimensional or cubemap textures in most image formats supported by the Image I/O framework. In iOS, it can also load textures compressed in the PVRTC format. It can load the data synchronously or asynchronously.
To load textures synchronously, make a context with the desired sharegroup the current context, and then call one or more of the class methods. The returned texture info object includes details about the loaded texture.
To load textures asynchronously, your initialization code allocates and initializes a new GLKTextureLoader object using the sharegroup object that should be the destination for new textures. Then, to load a texture, your app calls one of the texture loader’s instance methods, passing in a completion handler block to be called when the texture has been loaded.
The following OpenGL properties are set for a newly created, non-mipmapped texture:
- `GL_TEXTURE_MIN_FILTER`:`GL_LINEAR` - `GL_TEXTURE_MAG_FILTER`:`GL_LINEAR` - `GL_TEXTURE_WRAP_S`:`GL_CLAMP_TO_EDGE` - `GL_TEXTURE_WRAP_T`:`GL_CLAMP_TO_EDGE`
The following OpenGL properties are set for a newly created, mipmapped texture:
- `GL_TEXTURE_MIN_FILTER`:`GL_LINEAR_MIPMAP_LINEAR` - `GL_TEXTURE_MAG_FILTER`:`GL_LINEAR` - `GL_TEXTURE_WRAP_S`:`GL_CLAMP_TO_EDGE` - `GL_TEXTURE_WRAP_T`:`GL_CLAMP_TO_EDGE`
The GLKTextureLoader and GLKTextureInfo classes do not manage the OpenGL texture for you. Once the texture is returned to your app, you are responsible for it. This means that after your app is finished using an OpenGL texture, it must explicitly deallocate it by calling the `glDeleteTextures` function.
See: https://developer.apple.com/documentation/GLKit/GLKTextureLoader
func GLKTextureLoaderFromID ¶
func GLKTextureLoaderFromID(id objc.ID) GLKTextureLoader
GLKTextureLoaderFromID constructs a GLKTextureLoader from an objc.ID.
A utility class that simplifies loading OpenGL or OpenGL ES texture datas from a variety of image file formats.
func NewGLKTextureLoader ¶
func NewGLKTextureLoader() GLKTextureLoader
NewGLKTextureLoader creates a new GLKTextureLoader instance.
func NewGLKTextureLoaderWithShareContext ¶
func NewGLKTextureLoaderWithShareContext(context appkit.NSOpenGLContext) GLKTextureLoader
Initializes a new texture loader object.
context: The share context used to store new textures.
Return Value ¶
A newly initialized texture loader.
Discussion ¶
You only create a texture loader object when your app needs to load textures asynchronously.
See: https://developer.apple.com/documentation/GLKit/GLKTextureLoader/init(share:)
func NewGLKTextureLoaderWithSharegroup ¶
func NewGLKTextureLoaderWithSharegroup(sharegroup objectivec.IObject) GLKTextureLoader
Initializes a new texture loader object.
sharegroup: The sharegroup used to store new textures.
Return Value ¶
A newly initialized texture loader.
Discussion ¶
You only create a texture loader object when your app needs to load textures asynchronously.
See: https://developer.apple.com/documentation/GLKit/GLKTextureLoader/init(sharegroup:)
func (GLKTextureLoader) Autorelease ¶
func (g GLKTextureLoader) Autorelease() GLKTextureLoader
Autorelease adds the receiver to the current autorelease pool.
func (GLKTextureLoader) Init ¶
func (g GLKTextureLoader) Init() GLKTextureLoader
Init initializes the instance.
type GLKTextureLoaderCallback ¶
type GLKTextureLoaderCallback = func(GLKTextureInfo, 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 GLKTextureLoaderClass ¶
type GLKTextureLoaderClass struct {
// contains filtered or unexported fields
}
func GetGLKTextureLoaderClass ¶
func GetGLKTextureLoaderClass() GLKTextureLoaderClass
GetGLKTextureLoaderClass returns the class object for GLKTextureLoader.
func (GLKTextureLoaderClass) Alloc ¶
func (gc GLKTextureLoaderClass) Alloc() GLKTextureLoader
Alloc allocates memory for a new instance of the class.
func (GLKTextureLoaderClass) Class ¶
func (gc GLKTextureLoaderClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
It panics if GLKMathProject is unavailable at run time; use TryGLKMathProject to get an error instead.
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.
It panics if GLKMathUnproject is unavailable at run time; use TryGLKMathUnproject to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKMathUnproject(_:_:_:_:_:)
func GLKQuaternionAxis ¶
func GLKQuaternionAxis(quaternion GLKQuaternion) GLKVector3
GLKQuaternionAxis returns the axis of rotation of a quaternion.
It panics if GLKQuaternionAxis is unavailable at run time; use TryGLKQuaternionAxis to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKQuaternionAxis(_:)
func TryGLKMathProject ¶
func TryGLKMathProject(object GLKVector3, model GLKMatrix4, projection GLKMatrix4, viewport *int32) (GLKVector3, error)
TryGLKMathProject is like GLKMathProject but returns an error instead of panicking if GLKMathProject is unavailable at run time.
func TryGLKMathUnproject ¶
func TryGLKMathUnproject(window GLKVector3, model GLKMatrix4, projection GLKMatrix4, viewport *int32, success *bool) (GLKVector3, error)
TryGLKMathUnproject is like GLKMathUnproject but returns an error instead of panicking if GLKMathUnproject is unavailable at run time.
func TryGLKQuaternionAxis ¶
func TryGLKQuaternionAxis(quaternion GLKQuaternion) (GLKVector3, error)
TryGLKQuaternionAxis is like GLKQuaternionAxis but returns an error instead of panicking if GLKQuaternionAxis is unavailable at run time.
type GLKVector4 ¶
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.
It panics if GLKVertexAttributeParametersFromModelIO is unavailable at run time; use TryGLKVertexAttributeParametersFromModelIO to get an error instead.
See: https://developer.apple.com/documentation/GLKit/GLKVertexAttributeParametersFromModelIO(_:)
func TryGLKVertexAttributeParametersFromModelIO ¶
func TryGLKVertexAttributeParametersFromModelIO(vertexFormat uint) (GLKVertexAttributeParameters, error)
TryGLKVertexAttributeParametersFromModelIO is like GLKVertexAttributeParametersFromModelIO but returns an error instead of panicking if GLKVertexAttributeParametersFromModelIO is unavailable at run time.
type IGLKBaseEffect ¶
type IGLKBaseEffect interface {
objectivec.IObject
// A string used to name your effect.
Label() string
SetLabel(value string)
// The modelview, projection and texture transformations applied to the vertex data when the effect is bound.
Transform() IGLKEffectPropertyTransform
// The strategy the effect uses to calculate light values at each fragment. See [GLKLightingType](<https://developer.apple.com/documentation/GLKit/GLKLightingType>).
LightingType() GLKLightingType
SetLightingType(value GLKLightingType)
// A Boolean value that indicates whether lighting is calculated for both sides of a primitive.
LightModelTwoSided() uint8
SetLightModelTwoSided(value uint8)
// The material properties used when calculating the light values for a rendered primitive.
Material() IGLKEffectPropertyMaterial
// The ambient color applied to all primitives rendered by the effect.
LightModelAmbientColor() GLKVector4
SetLightModelAmbientColor(value GLKVector4)
// The lighting properties for the first light in the scene.
Light0() IGLKEffectPropertyLight
// The lighting properties for the second light in the scene.
Light1() IGLKEffectPropertyLight
// The lighting properties for the third light in the scene.
Light2() IGLKEffectPropertyLight
// The properties for the first texture.
Texture2d0() IGLKEffectPropertyTexture
// The properties for the second texture.
Texture2d1() IGLKEffectPropertyTexture
// The order in which textures are applied to rendered primitives.
TextureOrder() []GLKEffectPropertyTexture
SetTextureOrder(value []GLKEffectPropertyTexture)
// The fog properties to apply to the scene.
Fog() IGLKEffectPropertyFog
// A Boolean value that indicates whether or not to use the color vertex attribute when calculating the light’s interaction with the material.
ColorMaterialEnabled() uint8
SetColorMaterialEnabled(value uint8)
// A Boolean value that indicates whether or not to use the constant color.
UseConstantColor() uint8
SetUseConstantColor(value uint8)
// A constant color, used when per-vertex color data is not provided.
ConstantColor() GLKVector4
SetConstantColor(value GLKVector4)
// Prepares an effect for OpenGL ES rendering.
PrepareToDraw()
}
An interface definition for the GLKBaseEffect class.
Naming the Effect ¶
- IGLKBaseEffect.Label: A string used to name your effect.
- IGLKBaseEffect.SetLabel
Configuring the Modelview Transform ¶
- IGLKBaseEffect.Transform: The modelview, projection and texture transformations applied to the vertex data when the effect is bound.
Configuring Lights ¶
- IGLKBaseEffect.LightingType: The strategy the effect uses to calculate light values at each fragment. See GLKLightingType(<https://developer.apple.com/documentation/GLKit/GLKLightingType>).
- IGLKBaseEffect.SetLightingType
- IGLKBaseEffect.LightModelTwoSided: A Boolean value that indicates whether lighting is calculated for both sides of a primitive.
- IGLKBaseEffect.SetLightModelTwoSided
- IGLKBaseEffect.Material: The material properties used when calculating the light values for a rendered primitive.
- IGLKBaseEffect.LightModelAmbientColor: The ambient color applied to all primitives rendered by the effect.
- IGLKBaseEffect.SetLightModelAmbientColor
- IGLKBaseEffect.Light0: The lighting properties for the first light in the scene.
- IGLKBaseEffect.Light1: The lighting properties for the second light in the scene.
- IGLKBaseEffect.Light2: The lighting properties for the third light in the scene.
Configuring Textures ¶
- IGLKBaseEffect.Texture2d0: The properties for the first texture.
- IGLKBaseEffect.Texture2d1: The properties for the second texture.
- IGLKBaseEffect.TextureOrder: The order in which textures are applied to rendered primitives.
- IGLKBaseEffect.SetTextureOrder
Configuring Fog ¶
- IGLKBaseEffect.Fog: The fog properties to apply to the scene.
Configuring Color Information ¶
- IGLKBaseEffect.ColorMaterialEnabled: A Boolean value that indicates whether or not to use the color vertex attribute when calculating the light’s interaction with the material.
- IGLKBaseEffect.SetColorMaterialEnabled
- IGLKBaseEffect.UseConstantColor: A Boolean value that indicates whether or not to use the constant color.
- IGLKBaseEffect.SetUseConstantColor
- IGLKBaseEffect.ConstantColor: A constant color, used when per-vertex color data is not provided.
- IGLKBaseEffect.SetConstantColor
See: https://developer.apple.com/documentation/GLKit/GLKBaseEffect
type IGLKEffectProperty ¶
type IGLKEffectProperty interface {
objectivec.IObject
}
An interface definition for the GLKEffectProperty class.
See: https://developer.apple.com/documentation/GLKit/GLKEffectProperty
type IGLKEffectPropertyFog ¶
type IGLKEffectPropertyFog interface {
IGLKEffectProperty
// A Boolean value that indicates whether fog is applied to the fragment color.
Enabled() uint8
SetEnabled(value uint8)
// The algorithm used to compute the density of the fog applied to the fragment color.
Mode() int32
SetMode(value int32)
// The color of the fog at maximum density.
Color() GLKVector4
SetColor(value GLKVector4)
// The rate at which the fog exponent increases.
Density() unsafe.Pointer
SetDensity(value unsafe.Pointer)
// The minimum distance in eye coordinates before fog is applied to the fragment color.
Start() unsafe.Pointer
SetStart(value unsafe.Pointer)
// The distance in eye coordinates where fog completely covers the color fragment.
End() unsafe.Pointer
SetEnd(value unsafe.Pointer)
}
An interface definition for the GLKEffectPropertyFog class.
Enabling Fog ¶
- IGLKEffectPropertyFog.Enabled: A Boolean value that indicates whether fog is applied to the fragment color.
- IGLKEffectPropertyFog.SetEnabled
Choosing the Fog Mode ¶
- IGLKEffectPropertyFog.Mode: The algorithm used to compute the density of the fog applied to the fragment color.
- IGLKEffectPropertyFog.SetMode
Fog Properties ¶
- IGLKEffectPropertyFog.Color: The color of the fog at maximum density.
- IGLKEffectPropertyFog.SetColor
- IGLKEffectPropertyFog.Density: The rate at which the fog exponent increases.
- IGLKEffectPropertyFog.SetDensity
- IGLKEffectPropertyFog.Start: The minimum distance in eye coordinates before fog is applied to the fragment color.
- IGLKEffectPropertyFog.SetStart
- IGLKEffectPropertyFog.End: The distance in eye coordinates where fog completely covers the color fragment.
- IGLKEffectPropertyFog.SetEnd
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyFog
type IGLKEffectPropertyLight ¶
type IGLKEffectPropertyLight interface {
IGLKEffectProperty
// A Boolean value that indicates whether calculations should be performed on this light.
Enabled() uint8
SetEnabled(value uint8)
// The position of the light in world coordinates.
Position() GLKVector4
SetPosition(value GLKVector4)
// A transform applied to the light’s position and direction before calculating the contribution of the light.
Transform() IGLKEffectPropertyTransform
SetTransform(value IGLKEffectPropertyTransform)
// The ambient portion of the light.
AmbientColor() GLKVector4
SetAmbientColor(value GLKVector4)
// The diffuse portion of the light.
DiffuseColor() GLKVector4
SetDiffuseColor(value GLKVector4)
// The specular portion of the light.
SpecularColor() GLKVector4
SetSpecularColor(value GLKVector4)
// A constant factor applied to the attenuation of a point light or spotlight.
ConstantAttenuation() unsafe.Pointer
SetConstantAttenuation(value unsafe.Pointer)
// A linear factor applied to the attenuation of a point light or spotlight.
LinearAttenuation() unsafe.Pointer
SetLinearAttenuation(value unsafe.Pointer)
// A quadratic factor applied to the attenuation of a point light or spotlight.
QuadraticAttenuation() unsafe.Pointer
SetQuadraticAttenuation(value unsafe.Pointer)
// The angle in degrees where the spotlight is cut off.
SpotCutoff() unsafe.Pointer
SetSpotCutoff(value unsafe.Pointer)
// A vector indicating the direction the spotlight is projecting.
SpotDirection() GLKVector3
SetSpotDirection(value GLKVector3)
// A value indicating how focused the spotlight is.
SpotExponent() unsafe.Pointer
SetSpotExponent(value unsafe.Pointer)
}
An interface definition for the GLKEffectPropertyLight class.
Configuring Common Lighting Properties ¶
- IGLKEffectPropertyLight.Enabled: A Boolean value that indicates whether calculations should be performed on this light.
- IGLKEffectPropertyLight.SetEnabled
- IGLKEffectPropertyLight.Position: The position of the light in world coordinates.
- IGLKEffectPropertyLight.SetPosition
- IGLKEffectPropertyLight.Transform: A transform applied to the light’s position and direction before calculating the contribution of the light.
- IGLKEffectPropertyLight.SetTransform
Configuring Light Colors ¶
- IGLKEffectPropertyLight.AmbientColor: The ambient portion of the light.
- IGLKEffectPropertyLight.SetAmbientColor
- IGLKEffectPropertyLight.DiffuseColor: The diffuse portion of the light.
- IGLKEffectPropertyLight.SetDiffuseColor
- IGLKEffectPropertyLight.SpecularColor: The specular portion of the light.
- IGLKEffectPropertyLight.SetSpecularColor
Configuring Lighting Attenuation ¶
- IGLKEffectPropertyLight.ConstantAttenuation: A constant factor applied to the attenuation of a point light or spotlight.
- IGLKEffectPropertyLight.SetConstantAttenuation
- IGLKEffectPropertyLight.LinearAttenuation: A linear factor applied to the attenuation of a point light or spotlight.
- IGLKEffectPropertyLight.SetLinearAttenuation
- IGLKEffectPropertyLight.QuadraticAttenuation: A quadratic factor applied to the attenuation of a point light or spotlight.
- IGLKEffectPropertyLight.SetQuadraticAttenuation
Configuring Spotlight Properties ¶
- IGLKEffectPropertyLight.SpotCutoff: The angle in degrees where the spotlight is cut off.
- IGLKEffectPropertyLight.SetSpotCutoff
- IGLKEffectPropertyLight.SpotDirection: A vector indicating the direction the spotlight is projecting.
- IGLKEffectPropertyLight.SetSpotDirection
- IGLKEffectPropertyLight.SpotExponent: A value indicating how focused the spotlight is.
- IGLKEffectPropertyLight.SetSpotExponent
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyLight
type IGLKEffectPropertyMaterial ¶
type IGLKEffectPropertyMaterial interface {
IGLKEffectProperty
// The ambient color of the material.
AmbientColor() GLKVector4
SetAmbientColor(value GLKVector4)
// The diffuse color of the material.
DiffuseColor() GLKVector4
SetDiffuseColor(value GLKVector4)
// The emissive color of the material.
EmissiveColor() GLKVector4
SetEmissiveColor(value GLKVector4)
// The shininess of the material, used when calculating specular lighting effects.
Shininess() unsafe.Pointer
SetShininess(value unsafe.Pointer)
// The specular color of the material.
SpecularColor() GLKVector4
SetSpecularColor(value GLKVector4)
}
An interface definition for the GLKEffectPropertyMaterial class.
Material Properties ¶
- IGLKEffectPropertyMaterial.AmbientColor: The ambient color of the material.
- IGLKEffectPropertyMaterial.SetAmbientColor
- IGLKEffectPropertyMaterial.DiffuseColor: The diffuse color of the material.
- IGLKEffectPropertyMaterial.SetDiffuseColor
- IGLKEffectPropertyMaterial.EmissiveColor: The emissive color of the material.
- IGLKEffectPropertyMaterial.SetEmissiveColor
- IGLKEffectPropertyMaterial.Shininess: The shininess of the material, used when calculating specular lighting effects.
- IGLKEffectPropertyMaterial.SetShininess
- IGLKEffectPropertyMaterial.SpecularColor: The specular color of the material.
- IGLKEffectPropertyMaterial.SetSpecularColor
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyMaterial
type IGLKEffectPropertyTexture ¶
type IGLKEffectPropertyTexture interface {
IGLKEffectProperty
// A Boolean value that indicates whether this texture is used to texture drawn primitives.
Enabled() uint8
SetEnabled(value uint8)
// The mode the texture uses to compute its output fragment color. See [GLKTextureEnvMode](<https://developer.apple.com/documentation/GLKit/GLKTextureEnvMode>).
EnvMode() GLKTextureEnvMode
SetEnvMode(value GLKTextureEnvMode)
// The OpenGL name for the texture being sampled by this texture stage.
Name() uint32
SetName(value uint32)
// The kind of texture pointed to by the texture stage. See [GLKTextureTarget](<https://developer.apple.com/documentation/GLKit/GLKTextureTarget>).
Target() GLKTextureTarget
SetTarget(value GLKTextureTarget)
}
An interface definition for the GLKEffectPropertyTexture class.
Configuring Texture Properties ¶
- IGLKEffectPropertyTexture.Enabled: A Boolean value that indicates whether this texture is used to texture drawn primitives.
- IGLKEffectPropertyTexture.SetEnabled
- IGLKEffectPropertyTexture.EnvMode: The mode the texture uses to compute its output fragment color. See GLKTextureEnvMode(<https://developer.apple.com/documentation/GLKit/GLKTextureEnvMode>).
- IGLKEffectPropertyTexture.SetEnvMode
- IGLKEffectPropertyTexture.Name: The OpenGL name for the texture being sampled by this texture stage.
- IGLKEffectPropertyTexture.SetName
- IGLKEffectPropertyTexture.Target: The kind of texture pointed to by the texture stage. See GLKTextureTarget(<https://developer.apple.com/documentation/GLKit/GLKTextureTarget>).
- IGLKEffectPropertyTexture.SetTarget
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTexture
type IGLKEffectPropertyTransform ¶
type IGLKEffectPropertyTransform interface {
IGLKEffectProperty
// The matrix used to transform position coordinates from world space to eye space.
ModelviewMatrix() GLKMatrix4
SetModelviewMatrix(value GLKMatrix4)
// The matrix used to transform normal coordinates from world space to eye space.
NormalMatrix() GLKMatrix3
// The matrix used to transform position coordinates from eye space to projection space.
ProjectionMatrix() GLKMatrix4
SetProjectionMatrix(value GLKMatrix4)
}
An interface definition for the GLKEffectPropertyTransform class.
Configuring Modelview Properties ¶
- IGLKEffectPropertyTransform.ModelviewMatrix: The matrix used to transform position coordinates from world space to eye space.
- IGLKEffectPropertyTransform.SetModelviewMatrix
- IGLKEffectPropertyTransform.NormalMatrix: The matrix used to transform normal coordinates from world space to eye space.
Configuring the Projection Matrix ¶
- IGLKEffectPropertyTransform.ProjectionMatrix: The matrix used to transform position coordinates from eye space to projection space.
- IGLKEffectPropertyTransform.SetProjectionMatrix
See: https://developer.apple.com/documentation/GLKit/GLKEffectPropertyTransform
type IGLKMesh ¶
type IGLKMesh interface {
objectivec.IObject
Name() string
Submeshes() []GLKSubmesh
VertexBuffers() []GLKMeshBuffer
VertexCount() uint
VertexDescriptor() objc.ID
}
An interface definition for the GLKMesh class.
Instance Properties ¶
- IGLKMesh.Name
- IGLKMesh.Submeshes
- IGLKMesh.VertexBuffers
- IGLKMesh.VertexCount
- IGLKMesh.VertexDescriptor
See: https://developer.apple.com/documentation/GLKit/GLKMesh
type IGLKMeshBuffer ¶
type IGLKMeshBuffer interface {
objectivec.IObject
Allocator() IGLKMeshBufferAllocator
GlBufferName() uint32
Length() uint
Offset() uint
Type() uint
}
An interface definition for the GLKMeshBuffer class.
Instance Properties ¶
- IGLKMeshBuffer.Allocator
- IGLKMeshBuffer.GlBufferName
- IGLKMeshBuffer.Length
- IGLKMeshBuffer.Offset
- IGLKMeshBuffer.Type
See: https://developer.apple.com/documentation/GLKit/GLKMeshBuffer
type IGLKMeshBufferAllocator ¶
type IGLKMeshBufferAllocator interface {
objectivec.IObject
}
An interface definition for the GLKMeshBufferAllocator class.
See: https://developer.apple.com/documentation/GLKit/GLKMeshBufferAllocator
type IGLKReflectionMapEffect ¶
type IGLKReflectionMapEffect interface {
IGLKBaseEffect
// The texture map to apply in the reflection stage.
TextureCubeMap() IGLKEffectPropertyTexture
// The reflection matrix to apply to the normals of the submitted vertices.
Matrix() GLKMatrix3
SetMatrix(value GLKMatrix3)
}
An interface definition for the GLKReflectionMapEffect class.
Effect Properties ¶
- IGLKReflectionMapEffect.TextureCubeMap: The texture map to apply in the reflection stage.
- IGLKReflectionMapEffect.Matrix: The reflection matrix to apply to the normals of the submitted vertices.
- IGLKReflectionMapEffect.SetMatrix
See: https://developer.apple.com/documentation/GLKit/GLKReflectionMapEffect
type IGLKSkyboxEffect ¶
type IGLKSkyboxEffect interface {
objectivec.IObject
// A string used to name your effect.
Label() string
SetLabel(value string)
// The texture to apply to the skybox.
TextureCubeMap() IGLKEffectPropertyTexture
// The center of the skybox.
Center() GLKVector3
SetCenter(value GLKVector3)
// The width of the skybox.
XSize() unsafe.Pointer
SetXSize(value unsafe.Pointer)
// The height of the skybox.
YSize() unsafe.Pointer
SetYSize(value unsafe.Pointer)
// The depth of the skybox.
ZSize() unsafe.Pointer
SetZSize(value unsafe.Pointer)
// The transform applied before drawing the skybox.
Transform() IGLKEffectPropertyTransform
// Prepares an effect for OpenGL ES rendering.
PrepareToDraw()
}
An interface definition for the GLKSkyboxEffect class.
Naming the Effect ¶
- IGLKSkyboxEffect.Label: A string used to name your effect.
- IGLKSkyboxEffect.SetLabel
Configuring the Skybox ¶
- IGLKSkyboxEffect.TextureCubeMap: The texture to apply to the skybox.
- IGLKSkyboxEffect.Center: The center of the skybox.
- IGLKSkyboxEffect.SetCenter
- IGLKSkyboxEffect.XSize: The width of the skybox.
- IGLKSkyboxEffect.SetXSize
- IGLKSkyboxEffect.YSize: The height of the skybox.
- IGLKSkyboxEffect.SetYSize
- IGLKSkyboxEffect.ZSize: The depth of the skybox.
- IGLKSkyboxEffect.SetZSize
Setting the Skybox Transform ¶
- IGLKSkyboxEffect.Transform: The transform applied before drawing the skybox.
See: https://developer.apple.com/documentation/GLKit/GLKSkyboxEffect
type IGLKSubmesh ¶
type IGLKSubmesh interface {
objectivec.IObject
ElementBuffer() IGLKMeshBuffer
ElementCount() int32
Mesh() IGLKMesh
Mode() uint32
Name() string
Type() uint32
}
An interface definition for the GLKSubmesh class.
Instance Properties ¶
- IGLKSubmesh.ElementBuffer
- IGLKSubmesh.ElementCount
- IGLKSubmesh.Mesh
- IGLKSubmesh.Mode
- IGLKSubmesh.Name
- IGLKSubmesh.Type
See: https://developer.apple.com/documentation/GLKit/GLKSubmesh
type IGLKTextureInfo ¶
type IGLKTextureInfo interface {
objectivec.IObject
// The OpenGL context’s name for the texture.
Name() uint32
// The OpenGL binding target for the texture.
Target() uint32
// The height of the loaded texture.
Height() uint32
// The width of the loaded texture.
Width() uint32
// The location of the origin in the loaded texture.
TextureOrigin() GLKTextureInfoOrigin
// The state of the alpha component in the loaded texture.
AlphaState() GLKTextureInfoAlphaState
// A Boolean value that states whether the loaded texture contains mip maps.
ContainsMipmaps() bool
ArrayLength() uint32
Depth() uint32
MimapLevelCount() uint32
}
An interface definition for the GLKTextureInfo class.
Reading Texture Information ¶
- IGLKTextureInfo.Name: The OpenGL context’s name for the texture.
- IGLKTextureInfo.Target: The OpenGL binding target for the texture.
- IGLKTextureInfo.Height: The height of the loaded texture.
- IGLKTextureInfo.Width: The width of the loaded texture.
- IGLKTextureInfo.TextureOrigin: The location of the origin in the loaded texture.
- IGLKTextureInfo.AlphaState: The state of the alpha component in the loaded texture.
- IGLKTextureInfo.ContainsMipmaps: A Boolean value that states whether the loaded texture contains mip maps.
Instance Properties ¶
See: https://developer.apple.com/documentation/GLKit/GLKTextureInfo
type IGLKTextureLoader ¶
type IGLKTextureLoader interface {
objectivec.IObject
}
An interface definition for the GLKTextureLoader class.
See: https://developer.apple.com/documentation/GLKit/GLKTextureLoader
Source Files
¶
- blocks.gen.go
- doc.gen.go
- enums.gen.go
- functions.gen.go
- generate.go
- glk_base_effect.gen.go
- glk_effect_property.gen.go
- glk_effect_property_fog.gen.go
- glk_effect_property_light.gen.go
- glk_effect_property_material.gen.go
- glk_effect_property_texture.gen.go
- glk_effect_property_transform.gen.go
- glk_mesh.gen.go
- glk_mesh_buffer.gen.go
- glk_mesh_buffer_allocator.gen.go
- glk_named_effect_protocol.gen.go
- glk_reflection_map_effect.gen.go
- glk_skybox_effect.gen.go
- glk_submesh.gen.go
- glk_texture_info.gen.go
- glk_texture_loader.gen.go
- global_vars.gen.go
- typedefs.gen.go
- types.gen.go
- undefined_types.gen.go