// FrameBuffer.h #ifdef __EMSCRIPTEN__ #else #include "GL/glew.h" #endif #pragma once #include #if defined(__APPLE__) #include #if defined(IMGUI_IMPL_OPENGL_ES2) #include #else #include #endif #else #include #if defined(IMGUI_IMPL_OPENGL_ES2) #include #else #include #endif #endif class FrameBuffer { public: FrameBuffer(float width, float height); ~FrameBuffer(); unsigned int getFrameTexture(); void RescaleFrameBuffer(float width, float height); void Bind() const; void Unbind() const; private: unsigned int fbo; unsigned int texture; unsigned int rbo; };