QGearsBackgroundTextureLoader.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #pragma once
  16. #include <OgreResource.h>
  17. namespace QGears{
  18. class BackgroundFile;
  19. /**
  20. * Handles background texture loading.
  21. */
  22. class BackgroundTextureLoader : public Ogre::ManualResourceLoader{
  23. public:
  24. /**
  25. * Constructor.
  26. *
  27. * @param background_file[in] The background file.
  28. */
  29. explicit BackgroundTextureLoader(BackgroundFile &background_file);
  30. /**
  31. * Destructor.
  32. */
  33. virtual ~BackgroundTextureLoader();
  34. /**
  35. * Loads a resource.
  36. *
  37. * @param resource[in] The resource to load.
  38. */
  39. virtual void loadResource(Ogre::Resource *resource);
  40. private:
  41. /**
  42. * The background file.
  43. */
  44. BackgroundFile &background_file_;
  45. };
  46. }