2024-08-13 17:47:16 -04:00
|
|
|
#ifndef FBO_H_
|
|
|
|
#define FBO_H_
|
|
|
|
|
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
|
|
|
|
class FBO {
|
|
|
|
public:
|
|
|
|
FBO();
|
|
|
|
~FBO();
|
|
|
|
|
|
|
|
GLuint fbo_id_;
|
|
|
|
GLuint color_texture_id_;
|
2024-08-17 19:08:11 -04:00
|
|
|
GLuint position_texture_id_;
|
2024-08-13 17:47:16 -04:00
|
|
|
GLuint depth_rbo_id_;
|
|
|
|
|
|
|
|
void Init(int width, int height);
|
|
|
|
void Bind();
|
|
|
|
void Unbind();
|
|
|
|
void Cleanup();
|
|
|
|
GLuint GetColorTexture() const;
|
2024-08-17 19:08:11 -04:00
|
|
|
GLuint GetPositionTexture() const;
|
2024-08-13 17:47:16 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FBO_H_
|