texture0.h
Upload User: xuczgm
Upload Date: 2022-04-25
Package Size: 8601k
Code Size: 1k
Category:

Special Effects

Development Platform:

Visual C++

  1. #ifndef __TEXTURE_H
  2. #define __TEXTURE_H
  3. #include <stdio.h>
  4. #include <iostream.h>
  5. #include <windows.h>
  6. #include <commctrl.h>
  7. #include <windowsx.h>
  8. #include <gl/gl.h>
  9. enum texTypes_t
  10. {
  11. PCX,
  12. BMP,
  13. TGA
  14. };
  15. typedef struct 
  16. {
  17. // C Compatible version: enum texTypes textureType;
  18. // We use C++ only version
  19. texTypes_t textureType;
  20. int width; // width of texture
  21. int height; // height of texture
  22. long int scaledWidth;
  23. long int scaledHeight;
  24. unsigned int texID; // the texture object id of this texture
  25. unsigned char *data; // the texture data
  26. unsigned char *palette;
  27. } texture_t;
  28. // only partial pcx file header
  29. typedef struct
  30. {
  31. unsigned char manufacturer;
  32. unsigned char version;
  33. unsigned char encoding;
  34. unsigned char bits;
  35. unsigned char xMin;
  36. unsigned char yMin;
  37. unsigned char xMax;
  38. unsigned char yMax;
  39. unsigned char *palette;
  40. } PCXHEADER;
  41. #endif