GenericResource.h 676 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  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. ANKI_USE_RESULT Error load(const ResourceFilename& filename, Bool async);
  18. const DynamicArray<U8>& getData() const
  19. {
  20. return m_data;
  21. }
  22. private:
  23. DynamicArray<U8> m_data;
  24. };
  25. /// @}
  26. } // end namespace anki