GenericResource.h 655 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (C) 2009-2016, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <anki/resource/ResourceObject.h>
  7. namespace anki
  8. {
  9. /// @addtogroup resource
  10. /// @{
  11. /// A generic resource. It just loads a file to memory.
  12. class GenericResource : public ResourceObject
  13. {
  14. public:
  15. GenericResource(ResourceManager* manager);
  16. ~GenericResource();
  17. /// Load a texture
  18. ANKI_USE_RESULT Error load(const ResourceFilename& filename);
  19. const DArray<U8>& getData() const
  20. {
  21. return m_data;
  22. }
  23. private:
  24. DArray<U8> m_data;
  25. };
  26. /// @}
  27. } // end namespace anki