VAPOR3 3.9.4
Texture.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace VAPoR {
6
7class Framebuffer;
8
20
21class Texture : private NonCopyableMixin {
22protected:
23 unsigned int _id = 0;
24 unsigned int _width = 0;
25 unsigned int _height = 0;
26 unsigned int _depth = 0;
27 const unsigned int _type;
28 const unsigned int _nDims;
29
30public:
32 int Generate();
33 int Generate(int filter);
34 void Delete();
35 bool Initialized() const;
36 void Bind() const;
37 void UnBind() const;
38 int TexImage(int internalFormat, int width, int height, int depth, unsigned int format, unsigned int type, const void *data, int level = 0);
39
40 static unsigned int GetDimsCount(unsigned int glTextureEnum);
41
42protected:
43 Texture(unsigned int type);
44
45 friend class Framebuffer;
46};
47
48class Texture1D : public Texture {
49public:
51};
52class Texture2D : public Texture {
53public:
56};
57class Texture3D : public Texture {
58public:
60};
61class Texture2DArray : public Texture {
62public:
64};
65}; // namespace VAPoR
Wrapper class for an OpenGL Framebuffer.
Definition: Framebuffer.h:23
Mixin class that prevents copying.
void CopyDepthBuffer()
Wrapper class for an OpenGL texture.
Definition: Texture.h:21
unsigned int _width
Definition: Texture.h:24
int TexImage(int internalFormat, int width, int height, int depth, unsigned int format, unsigned int type, const void *data, int level=0)
unsigned int _height
Definition: Texture.h:25
unsigned int _depth
Definition: Texture.h:26
const unsigned int _nDims
Definition: Texture.h:28
const unsigned int _type
Definition: Texture.h:27
Texture(unsigned int type)
void UnBind() const
bool Initialized() const
static unsigned int GetDimsCount(unsigned int glTextureEnum)
unsigned int _id
Definition: Texture.h:23
void Bind() const
int Generate(int filter)