forked from bwrrp/glblaat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGLTexture3D.h
38 lines (28 loc) · 934 Bytes
/
GLTexture3D.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "GLTexture.h"
#include "GL.h"
class GLTexture3D : public GLTexture
{
public:
friend class GLRenderTexture3DLayer;
// Factory for textures
static GLTexture3D *New(int width, int height, int depth,
int internalformat, int format, int type, void *data);
// Shadow existing factory
static GLTexture3D *New(int width, int height,
int internalformat, int format, int type, void *data)
{
return New(width, height, 1, internalformat, format, type, data);
}
virtual ~GLTexture3D();
inline virtual GLenum GetTextureTarget() const { return GL_TEXTURE_3D; }
inline int GetDepth() const { return depth; }
protected:
int depth;
GLTexture3D(int width, int height, int depth, int internalformat);
virtual bool Allocate(int format, int type, void *data);
private:
// Not implemented
GLTexture3D(const GLTexture3D&);
void operator=(const GLTexture3D&);
};