GLKTextureLoader.inc 6.8 KB

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