<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:@E@GLKTextureLoaderError"
  },
  "title" : "GLKTextureLoaderError.Code"
}
-->

# GLKTextureLoaderError.Code

Values to be returned when a texture loader encounters an error.

```
enum Code
```

## Topics

### Initializers

[`init(rawValue:)`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/init(rawValue:))

### Type Properties

[`GLKTextureLoaderErrorAlphaPremultiplicationFailure`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/alphaPremultiplicationFailure)

The texture source data does not allow the alpha to be premultiplied.

[`GLKTextureLoaderErrorCompressedTextureUpload`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/compressedTextureUpload)

A compressed texture could not be uploaded.

[`GLKTextureLoaderErrorCubeMapInvalidNumFiles`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/cubeMapInvalidNumFiles)

The incorrect number of files were specified for the cube map.

[`GLKTextureLoaderErrorDataPreprocessingFailure`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/dataPreprocessingFailure)

The data could not be preprocessed correctly.

[`errorDomain`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/errorDomain)

[`GLKTextureLoaderErrorFileOrURLNotFound`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/fileOrURLNotFound)

A file could not be found at the path provided.

[`GLKTextureLoaderErrorIncompatibleFormatSRGB`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/incompatibleFormatSRGB)

The decoded data was in an incompatible format for an sRGB texture.

[`GLKTextureLoaderErrorInvalidCGImage`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/invalidCGImage)

The image provided was invalid.

[`GLKTextureLoaderErrorInvalidEAGLContext`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/invalidEAGLContext)

The EAGL context was not a valid context.

[`GLKTextureLoaderErrorInvalidNSData`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/invalidNSData)

The data provided is not in a recognized image format.

[`GLKTextureLoaderErrorMipmapUnsupported`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/mipmapUnsupported)

The texture source data does not allow mipmaps to be generated.

[`GLKTextureLoaderErrorPVRAtlasUnsupported`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/pvrAtlasUnsupported)

Cube maps may not be compressed in PVRTC format.

[`GLKTextureLoaderErrorReorientationFailure`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/reorientationFailure)

The texture source data does not allow the image to be reoriented.

[`GLKTextureLoaderErrorUncompressedTextureUpload`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/uncompressedTextureUpload)

An uncompressed texture could not be uploaded.

[`GLKTextureLoaderErrorUnknownFileType`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/unknownFileType)

The file was in an unrecognized format.

[`GLKTextureLoaderErrorUnknownPathType`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/unknownPathType)

The path type was unrecognized.

[`GLKTextureLoaderErrorUnsupportedBitDepth`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/unsupportedBitDepth)

The data in the source image has an unsupported bit depth.

[`GLKTextureLoaderErrorUnsupportedCubeMapDimensions`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/unsupportedCubeMapDimensions)

The cube map’s dimensions are incorrect.

[`GLKTextureLoaderErrorUnsupportedOrientation`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/unsupportedOrientation)

The texture source data is stored with an unsupported origin position.

[`GLKTextureLoaderErrorUnsupportedPVRFormat`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/unsupportedPVRFormat)

The data in the PVRTC compressed format is in an unsupported format.

[`GLKTextureLoaderErrorUnsupportedTextureTarget`](/documentation/GLKit/GLKTextureLoaderError-swift.struct/Code/unsupportedTextureTarget)

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)