1{ Parsed from GLKit.framework GLKTextureLoader.h } 2 3 4{ Types from GLKTextureLoader } 5{$ifdef TYPES} 6 7{$endif} 8 9 10{$ifdef TYPES} 11type 12 GLKTextureInfoPtr = ^GLKTextureInfo; 13 GLKTextureLoaderPtr = ^GLKTextureLoader; 14{$endif} 15 16{$ifdef EXTERNAL_SYMBOLS} 17var 18 GLKTextureLoaderApplyPremultiplication: NSString { available in 10_8, 5_0 }; cvar; external; 19 GLKTextureLoaderGenerateMipmaps: NSString { available in 10_8, 5_0 }; cvar; external; 20 GLKTextureLoaderOriginBottomLeft: NSString { available in 10_8, 5_0 }; cvar; external; 21 GLKTextureLoaderGrayscaleAsAlpha: NSString { available in 5_0 }; cvar; external; 22{$endif} 23 24{$if defined(TARGET_OS_IPHONE) or (defined(MAC_OS_X_VERSION_10_9))} 25{$ifdef EXTERNAL_SYMBOLS} 26var 27 GLKTextureLoaderSRGB: NSString { available in 10_9, 7_0 }; cvar; external; 28{$endif} 29 30{$else} 31{$ifdef EXTERNAL_SYMBOLS} 32var 33 GLKTextureLoaderSRGB: NSString; cvar; external; 34{$endif} 35 36{$endif} 37{$ifdef EXTERNAL_SYMBOLS} 38var 39 GLKTextureLoaderErrorDomain: NSString { available in 10_8, 5_0 }; cvar; external; 40 GLKTextureLoaderErrorKey: NSString { available in 10_8, 5_0 }; cvar; external; 41 GLKTextureLoaderGLErrorKey: NSString { available in 10_8, 5_0 }; cvar; external; 42{$endif} 43 44{$ifdef TYPES} 45type 46 GLKTextureLoaderError = GLuint; 47 GLKTextureLoaderErrorPtr = ^GLKTextureLoaderError; 48 49const 50 GLKTextureLoaderErrorFileOrURLNotFound = 0; 51 GLKTextureLoaderErrorInvalidNSData = 1; 52 GLKTextureLoaderErrorInvalidCGImage = 2; 53 GLKTextureLoaderErrorUnknownPathType = 3; 54 GLKTextureLoaderErrorUnknownFileType = 4; 55 GLKTextureLoaderErrorPVRAtlasUnsupported = 5; 56 GLKTextureLoaderErrorCubeMapInvalidNumFiles = 6; 57 GLKTextureLoaderErrorCompressedTextureUpload = 7; 58 GLKTextureLoaderErrorUncompressedTextureUpload = 8; 59 GLKTextureLoaderErrorUnsupportedCubeMapDimensions = 9; 60 GLKTextureLoaderErrorUnsupportedBitDepth = 10; 61 GLKTextureLoaderErrorUnsupportedPVRFormat = 11; 62 GLKTextureLoaderErrorDataPreprocessingFailure = 12; 63 GLKTextureLoaderErrorMipmapUnsupported = 13; 64 GLKTextureLoaderErrorUnsupportedOrientation = 14; 65 GLKTextureLoaderErrorReorientationFailure = 15; 66 GLKTextureLoaderErrorAlphaPremultiplicationFailure = 16; 67 GLKTextureLoaderErrorInvalidEAGLContext = 17; 68 GLKTextureLoaderErrorIncompatibleFormatSRGB = 18; 69 70type 71 GLKTextureInfoAlphaState = GLint; 72 GLKTextureInfoAlphaStatePtr = ^GLKTextureInfoAlphaState; 73 74const 75 GLKTextureInfoAlphaStateNone = 0; 76 GLKTextureInfoAlphaStateNonPremultiplied = 1; 77 GLKTextureInfoAlphaStatePremultiplied = 2; 78 79type 80 GLKTextureInfoOrigin = GLint; 81 GLKTextureInfoOriginPtr = ^GLKTextureInfoOrigin; 82 83const 84 GLKTextureInfoOriginUnknown = 0; 85 GLKTextureInfoOriginTopLeft = 1; 86 GLKTextureInfoOriginBottomLeft = 2; 87{$endif} 88 89{$ifdef CLASSES} 90 91type 92 GLKTextureInfo = objcclass external (NSObject, NSCopyingProtocol) 93 private 94 name: GLuint; 95 target: GLenum; 96 width: GLuint; 97 height: GLuint; 98 alphaState: GLKTextureInfoAlphaState; 99 textureOrigin: GLKTextureInfoOrigin; 100 containsMipmaps: ObjCBOOL; 101 public 102 function name_: GLuint; message 'name'; 103 function target_: GLenum; message 'target'; 104 function width_: GLuint; message 'width'; 105 function height_: GLuint; message 'height'; 106 function alphaState_: GLKTextureInfoAlphaState; message 'alphaState'; 107 function textureOrigin_: GLKTextureInfoOrigin; message 'textureOrigin'; 108 function containsMipmaps_: ObjCBOOL; message 'containsMipmaps'; 109 110 { Adopted protocols } 111 function copyWithZone (zone: NSZonePtr): id; message 'copyWithZone:'; 112 end; 113{$endif} 114 115{$ifdef TYPES} 116type 117 GLKTextureLoaderCallback = OpaqueCBlock; 118{$endif} 119 120{$ifdef CLASSES} 121 122type 123 GLKTextureLoader = objcclass external (NSObject) 124 private 125 public 126 class function textureWithContentsOfFile_options_error (path: NSString; options: NSDictionary; outError: NSErrorPtr): GLKTextureInfo; message 'textureWithContentsOfFile:options:error:'; 127 class function textureWithContentsOfURL_options_error (url: NSURL; options: NSDictionary; outError: NSErrorPtr): GLKTextureInfo; message 'textureWithContentsOfURL:options:error:'; 128 class function textureWithContentsOfData_options_error (data: NSData; options: NSDictionary; outError: NSErrorPtr): GLKTextureInfo; message 'textureWithContentsOfData:options:error:'; 129 class function textureWithCGImage_options_error (cgImage: CGImageRef; options: NSDictionary; outError: NSErrorPtr): GLKTextureInfo; message 'textureWithCGImage:options:error:'; 130 class function cubeMapWithContentsOfFiles_options_error (paths: NSArray; options: NSDictionary; outError: NSErrorPtr): GLKTextureInfo; message 'cubeMapWithContentsOfFiles:options:error:'; 131 class function cubeMapWithContentsOfFile_options_error (path: NSString; options: NSDictionary; outError: NSErrorPtr): GLKTextureInfo; message 'cubeMapWithContentsOfFile:options:error:'; 132 class function cubeMapWithContentsOfURL_options_error (url: NSURL; options: NSDictionary; outError: NSErrorPtr): GLKTextureInfo; message 'cubeMapWithContentsOfURL:options:error:'; 133 {$if defined(TARGET_OS_IPHONE)} 134 function initWithSharegroup (sharegroup: EAGLSharegroupPtr): id; message 'initWithSharegroup:'; 135 {$else} 136 function initWithShareContext (context: NSOpenGLContext): id; message 'initWithShareContext:'; 137 {$endif} 138 procedure textureWithContentsOfFile_options_queue_completionHandler (path: NSString; options: NSDictionary; queue: dispatch_queue_t; block: GLKTextureLoaderCallback); message 'textureWithContentsOfFile:options:queue:completionHandler:'; 139 procedure textureWithContentsOfURL_options_queue_completionHandler (url: NSURL; options: NSDictionary; queue: dispatch_queue_t; block: GLKTextureLoaderCallback); message 'textureWithContentsOfURL:options:queue:completionHandler:'; 140 procedure textureWithContentsOfData_options_queue_completionHandler (data: NSData; options: NSDictionary; queue: dispatch_queue_t; block: GLKTextureLoaderCallback); message 'textureWithContentsOfData:options:queue:completionHandler:'; 141 procedure textureWithCGImage_options_queue_completionHandler (cgImage: CGImageRef; options: NSDictionary; queue: dispatch_queue_t; block: GLKTextureLoaderCallback); message 'textureWithCGImage:options:queue:completionHandler:'; 142 procedure cubeMapWithContentsOfFiles_options_queue_completionHandler (paths: NSArray; options: NSDictionary; queue: dispatch_queue_t; block: GLKTextureLoaderCallback); message 'cubeMapWithContentsOfFiles:options:queue:completionHandler:'; 143 procedure cubeMapWithContentsOfFile_options_queue_completionHandler (path: NSString; options: NSDictionary; queue: dispatch_queue_t; block: GLKTextureLoaderCallback); message 'cubeMapWithContentsOfFile:options:queue:completionHandler:'; 144 procedure cubeMapWithContentsOfURL_options_queue_completionHandler (url: NSURL; options: NSDictionary; queue: dispatch_queue_t; block: GLKTextureLoaderCallback); message 'cubeMapWithContentsOfURL:options:queue:completionHandler:'; 145 end; 146{$endif} 147 148