Texture.h 823 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef INCLUDE_TEXTURE_H
  2. #define INCLUDE_TEXTURE_H
  3. /*
  4. * Texture.h
  5. * Texture backend abstraction
  6. */
  7. #include "utility/Rect.h"
  8. #include "platform.h"
  9. #include "render/Pixel.h"
  10. #include "piaf/Archive.h"
  11. //#include "PLATFORM/texture_type.h"
  12. namespace WalrusRPG
  13. {
  14. namespace Graphics
  15. {
  16. // This class only exists to get the common functions
  17. class Texture
  18. {
  19. private:
  20. public:
  21. // Mmmh, the smell of that awesome platform-based hack.
  22. texture_data_t data;
  23. Texture(WalrusRPG::PIAF::File entry);
  24. Texture(char *data);
  25. ~Texture();
  26. // Getters
  27. const WalrusRPG::Utils::Rect get_dimensions();
  28. const WalrusRPG::Graphics::Pixel get_pixel(unsigned x, unsigned y);
  29. };
  30. }
  31. }
  32. #endif