Aether3D Game Engine
RenderTexture.hpp
1 #ifndef RENDER_TEXTURE_H
2 #define RENDER_TEXTURE_H
3 
4 #include "TextureBase.hpp"
5 #include "Vec3.hpp"
6 
7 namespace ae3d
8 {
10  class RenderTexture : public TextureBase
11  {
12  public:
14  enum class DataType
15  {
16  UByte,
17  Float
18  };
19 
25  void Create2D( int width, int height, DataType dataType, TextureWrap wrap, TextureFilter filter );
26 
31  void CreateCube( int dimension, DataType dataType, TextureWrap wrap, TextureFilter filter );
32 
34  bool IsCube() const { return isCube; }
35 
37  unsigned GetFBO() const { return fboId; }
38 
39  private:
40  unsigned rboId = 0;
41  unsigned fboId = 0;
42  bool isCube = false;
43  };
44 }
45 #endif
TextureFilter filter
Filtering mode.
Definition: TextureBase.hpp:89
TextureWrap wrap
Wrapping controls how coordinates outside 0-1 are interpreted.
Definition: TextureBase.hpp:87
Definition: AudioClip.hpp:4
void CreateCube(int dimension, DataType dataType, TextureWrap wrap, TextureFilter filter)
int width
Width in pixels.
Definition: TextureBase.hpp:81
Render texture.
Definition: RenderTexture.hpp:10
bool IsCube() const
Definition: RenderTexture.hpp:34
unsigned GetFBO() const
Definition: RenderTexture.hpp:37
void Create2D(int width, int height, DataType dataType, TextureWrap wrap, TextureFilter filter)
DataType
Data type.
Definition: RenderTexture.hpp:14
int height
Height in pixels.
Definition: TextureBase.hpp:83
Base class for textures.
Definition: TextureBase.hpp:47