38 lines
No EOL
604 B
C++
38 lines
No EOL
604 B
C++
//add multipass support
|
|
|
|
#ifndef __MULTIPASS_HPP__
|
|
#define __MULTIPASS_HPP__
|
|
|
|
|
|
#include <GL/glew.h>
|
|
#include <SDL2/SDL.h>
|
|
#include <SDL2/SDL_opengl.h>
|
|
|
|
class Gbuffer{
|
|
public:
|
|
enum GBUFER_TEXTURES {
|
|
GBUFER_TEXTURE_POSITION,
|
|
GBUFER_TEXTURE_NORMAL,
|
|
GBUFER_TEXTURE_DIFFUSE,
|
|
GBUFER_TEXTURE_TEXCOORD,
|
|
GBUFER_TEXTURE_SHADOW,
|
|
GBUFER_NUM_TEXTURES
|
|
};
|
|
|
|
Gbuffer();
|
|
~Gbuffer();
|
|
|
|
bool init(GLuint width, GLuint height);
|
|
|
|
void bindW();
|
|
void bindR();
|
|
void bind();
|
|
void clear();
|
|
void clearw();
|
|
|
|
GLuint fbo;
|
|
GLuint textus[GBUFER_NUM_TEXTURES];
|
|
GLuint depthtext;
|
|
};
|
|
|
|
#endif |