Texture.h 838 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 "PLATFORM/texture_type.h"
  11. namespace WalrusRPG
  12. {
  13. namespace Graphics
  14. {
  15. // This class only exists to get the common functions
  16. class Texture
  17. {
  18. private:
  19. texture_data_t texture;
  20. unsigned width;
  21. unsigned height;
  22. public:
  23. // The get function is implemented by the child
  24. // TextureHolder &get_texture();
  25. Texture(char *data);
  26. ~Texture();
  27. // Getters
  28. WalrusRPG::Utils::Rect get_dimensions();
  29. const WalrusRPG::Graphics::Pixel get_pixel(unsigned x, unsigned y);
  30. };
  31. }
  32. }
  33. #endif