PVRTextureFormat.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef _PVRT_PIXEL_FORMAT_H
  2. #define _PVRT_PIXEL_FORMAT_H
  3. #include "PVRTextureDefines.h"
  4. #include "PVRTString.h"
  5. namespace pvrtexture
  6. {
  7. //Channel Names
  8. enum EChannelName
  9. {
  10. eNoChannel,
  11. eRed,
  12. eGreen,
  13. eBlue,
  14. eAlpha,
  15. eLuminance,
  16. eIntensity,
  17. eUnspecified,
  18. eNumChannels
  19. };
  20. //PixelType union
  21. union PVR_DLL PixelType
  22. {
  23. /*!***********************************************************************
  24. @Function PixelType
  25. @Return A new PixelType
  26. @Description Creates an empty pixeltype.
  27. *************************************************************************/
  28. PixelType();
  29. /*!***********************************************************************
  30. @Function PixelType
  31. @Input Type
  32. @Return A new PixelType
  33. @Description Initialises a new pixel type from a 64 bit integer value.
  34. *************************************************************************/
  35. PixelType(uint64 Type);
  36. /*!***********************************************************************
  37. @Function PixelType
  38. @Input C1Name
  39. @Input C2Name
  40. @Input C3Name
  41. @Input C4Name
  42. @Input C1Bits
  43. @Input C2Bits
  44. @Input C3Bits
  45. @Input C4Bits
  46. @Return A new PixelType
  47. @Description Takes up to 4 characters (CnName) and 4 values (CnBits)
  48. to create a new PixelType. Any unused channels should be set to 0.
  49. For example: PixelType('r','g','b',0,8,8,8,0);
  50. *************************************************************************/
  51. PixelType(uint8 C1Name, uint8 C2Name, uint8 C3Name, uint8 C4Name, uint8 C1Bits, uint8 C2Bits, uint8 C3Bits, uint8 C4Bits);
  52. struct PVR_DLL LowHigh
  53. {
  54. uint32 Low;
  55. uint32 High;
  56. } Part;
  57. uint64 PixelTypeID;
  58. uint8 PixelTypeChar[8];
  59. };
  60. static const PixelType PVRStandard8PixelType = PixelType('r','g','b','a',8,8,8,8);
  61. static const PixelType PVRStandard16PixelType = PixelType('r','g','b','a',16,16,16,16);
  62. static const PixelType PVRStandard32PixelType = PixelType('r','g','b','a',32,32,32,32);
  63. }
  64. #endif