Doxybook Example
Texture.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Handle.hpp"
4 
5 namespace Engine {
6  namespace Graphics {
15  class Texture : protected Handle {
16  public:
17  enum class Type {
21  UNKNOWN = 0,
25  RGBA_8,
26  RGB_8,
27  RGBA_16,
28  RGB_16,
29  RGBA_32,
30  RGB_32
31  };
32 
33  explicit Texture(Type type);
34  virtual ~Texture() = default;
39  virtual int getWidth() const = 0;
44  virtual int getHeight() const = 0;
50  virtual int getDepth() const = 0;
51  inline bool isLoaded() const {
55  return loaded;
56  }
57 
58  protected:
59  bool loaded{false};
61  };
62  } // namespace Graphics
63 } // namespace Engine
Definition: Handle.hpp:8
This is a base texture class that serves as a base class for other texture types.
Definition: Texture.hpp:15
virtual int getHeight() const =0
Returns the height of the texture in pixels.
Type
Definition: Texture.hpp:17
Type type
Definition: Texture.hpp:60
virtual int getWidth() const =0
Returns the width of the texture in pixels.
virtual ~Texture()=default
virtual int getDepth() const =0
Returns the depth of the texture in pixels.
bool loaded
Definition: Texture.hpp:59
bool isLoaded() const
Definition: Texture.hpp:51
This namespace contains all of the necessary engine components.
Definition: Asset.hpp:5