27 lines
407 B
C++
27 lines
407 B
C++
#ifndef GBUFFER_H
|
|
#define GBUFFER_H
|
|
|
|
#include <glew/glew.h>
|
|
|
|
class GBuffer
|
|
{
|
|
// fbo
|
|
GLuint fbo;
|
|
// textures
|
|
enum TextureType
|
|
{
|
|
NORMAL,
|
|
COLOR,
|
|
SPECULAR,
|
|
DEPTH,
|
|
NB_TEXTURES
|
|
};
|
|
GLuint textures[NB_TEXTURES];
|
|
public:
|
|
GBuffer(int width, int height);
|
|
void bind();
|
|
void bindTexture(TextureType type, int slot);
|
|
};
|
|
|
|
#endif // GBUFFER_H
|