GenericResource.h 657 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (C) 2009-2015, 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. /// @addtogroup resource
  9. /// @{
  10. /// A generic resource. It just loads a file to memory.
  11. class GenericResource: public ResourceObject
  12. {
  13. public:
  14. GenericResource(ResourceManager* manager);
  15. ~GenericResource();
  16. /// Load a texture
  17. ANKI_USE_RESULT Error load(const ResourceFilename& filename);
  18. const DArray<U8>& getData() const
  19. {
  20. return m_data;
  21. }
  22. private:
  23. DArray<U8> m_data;
  24. };
  25. /// @}
  26. } // end namespace anki