2
0

Texture.h 632 B

12345678910111213141516171819202122232425262728
  1. // ----------------------------------------------------------------
  2. // From Game Programming in C++ by Sanjay Madhav
  3. // Copyright (C) 2017 Sanjay Madhav. All rights reserved.
  4. //
  5. // Released under the BSD License
  6. // See LICENSE in root directory for full details.
  7. // ----------------------------------------------------------------
  8. #include <string>
  9. class Texture
  10. {
  11. public:
  12. Texture();
  13. ~Texture();
  14. bool Load(const std::string& fileName);
  15. void Unload();
  16. void SetActive();
  17. int GetWidth() const { return mWidth; }
  18. int GetHeight() const { return mHeight; }
  19. private:
  20. unsigned int mTextureID;
  21. int mWidth;
  22. int mHeight;
  23. };