GenericResource.h 676 B

1234567891011121314151617181920212223242526272829303132333435
  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. /// @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. ANKI_USE_RESULT Error load(const ResourceFilename& filename, Bool async);
  17. const DynamicArray<U8>& getData() const
  18. {
  19. return m_data;
  20. }
  21. private:
  22. DynamicArray<U8> m_data;
  23. };
  24. /// @}
  25. } // end namespace anki