22 lines
485 B
C++
22 lines
485 B
C++
#ifndef FBO_H_
|
|
#define FBO_H_
|
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
struct Framebuffer {
|
|
GLuint id = 0;
|
|
GLuint albedoTexture = 0;
|
|
GLuint positionTexture = 0;
|
|
GLuint normalTexture = 0;
|
|
GLuint depthTexture = 0;
|
|
};
|
|
|
|
namespace FBO {
|
|
Framebuffer GenerateFramebuffer(int width, int height);
|
|
void UpdateFrameBuffer(Framebuffer& fbo, int width, int height);
|
|
void Bind(const Framebuffer& fbo);
|
|
void Unbind();
|
|
void Cleanup(const Framebuffer& fbo);
|
|
}
|
|
|
|
#endif // FBO_H_
|