pvrtc_dll.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /******************************************************************************
  2. @File pvrtc_dll.h
  3. @Title
  4. @Version
  5. @Copyright Copyright (C) Imagination Technologies Limited.
  6. @Platform ANSI
  7. @Description header for memtools.c (AMTC related file)
  8. ******************************************************************************/
  9. #ifndef PVRTCDLL_H
  10. #define PVRTCDLL_H
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #define DllExport __declspec( dllexport )
  15. /******************************************************************************/
  16. /*
  17. // Function: pvrtc_compress
  18. //
  19. // Description: DLL version of pvrtc_compress function.
  20. // Given raw, packed 32 bit ARBG data,
  21. // this routine generates the compress format as used by PowerVR MBX.
  22. //
  23. // Inputs: InputArrayRGBA Input data as a packed array of bytes (8A 8R 8G 8B)
  24. //
  25. // OutputMemory Supplied memory for storage of resulting compress data.
  26. //
  27. // nWidth
  28. // nHeight Texture dimensions: Power of 2 square textures currently
  29. // supported. Sizes are limited to 8x8 through to 2048x2048,
  30. // 16x8 through 2048x2048 for 2 bpp cases.
  31. // bMipMap Generate all mipmap levels. Recommended for rendering speed &
  32. // quality
  33. // bAlphaOn Is alpha data supplied? If not, assumed Alpha == 0xFF
  34. //
  35. // bAssumeTiles The texture wrap around the edges.
  36. //
  37. // bUse2bitFormat 2bit per pixel format. Otherwise 4bit per pixel format.
  38. */
  39. /******************************************************************************/
  40. DllExport int pvrtc_compress( void* InputArrayARGB,
  41. void* OutputMemory,
  42. int nWidth,
  43. int nHeight,
  44. int bMipMap,
  45. int bAlphaOn,
  46. int bAssumeTiles,
  47. int bUse2bitFormat);
  48. /******************************************************************************/
  49. /*
  50. // Function: pvrtc_decompress
  51. //
  52. // Description: DLL version of pvrtc_decompress function.
  53. // Given an array of pixels compressed using PVR tetxure compression
  54. // generates the row 32-bit ARGB (8A8R8G8B) array.
  55. //
  56. // Inputs:
  57. // InputMemory Supplied data of stored compressed pixels.
  58. //
  59. // OutputArrayARGB Output data as a packed array of bytes (8R 8G 8B 8A)
  60. //
  61. // nWidth
  62. // nHeight Texture dimensions: Power of 2 square textures currently
  63. // supported. Sizes are limited to 8x8 through to 2048x2048,
  64. // 16x8 through 2048x2048 for 2 bpp cases.
  65. // nMipMapLevel Level to be decompressed
  66. //
  67. // bAssumeTiles The texture wrap around the edges.
  68. //
  69. // bUse2bitFormat 2bit per pixel format. Otherwise 4bit per pixel.
  70. */
  71. /******************************************************************************/
  72. DllExport int pvrtc_decompress( void* OutputArrayARGB,
  73. void* InputMemory,
  74. int nWidth,
  75. int nHeight,
  76. int nMipmapLevel,
  77. int nAssumeTiles,
  78. int nCompressionMode);
  79. /*************************************************************************
  80. // The PVRTC file size.
  81. // Use it for quering the final size after compression.
  82. // nWidth Current testure width
  83. // nHeight Current testure height
  84. // bMipMap Mipmap is used
  85. // bUse2bitFormat 2bit per pixel format. Otherwise 4bit per pixel
  86. **************************************************************************/
  87. DllExport int pvrtc_size( int nWidth,
  88. int nHeight,
  89. int bMipMap,
  90. int bUse2bitFormat
  91. );
  92. /******************************************************************************/
  93. /*
  94. // Function: pvrtc_getversion
  95. //
  96. // Description: Returns the version of PVRTC.
  97. //
  98. */
  99. /******************************************************************************/
  100. DllExport void pvrtc_get_version(unsigned int *uMayor, unsigned int *uMinor,
  101. unsigned int *uInternal, unsigned int *uBuild);
  102. /************************************************************************
  103. // pvrtc_info_output.
  104. // default output = NULL (no output)
  105. // Other values are stdout, stderr or a file created by the user
  106. *************************************************************************/
  107. DllExport void pvrtc_info_output(FILE *DebugOutput);
  108. #ifdef __cplusplus
  109. }
  110. #endif
  111. #endif /* PVRTCDLL_H */
  112. /*
  113. // END OF FILE
  114. */