diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2017-05-16 14:42:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-16 14:42:32 +0300 |
commit | d2f79bd2c7004af2d1459e8d5b7748763f241a54 (patch) | |
tree | 64300bccb750e59f7c3a05800eafcd5c3b3f89cb /drape/framebuffer.hpp | |
parent | aa6703383e8d4c2ff8445e8b3c27728846cdab4b (diff) | |
parent | 086d6f9cf247cea07cff6bc33d5567dc7c64806b (diff) |
Merge pull request #6040 from rokuz/es3-supportbeta-810
Added OpenGL ES3 support
Diffstat (limited to 'drape/framebuffer.hpp')
-rw-r--r-- | drape/framebuffer.hpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drape/framebuffer.hpp b/drape/framebuffer.hpp new file mode 100644 index 0000000000..39de064799 --- /dev/null +++ b/drape/framebuffer.hpp @@ -0,0 +1,37 @@ +#pragma once + +#include <cstdint> + +namespace dp +{ +class OGLContext; + +class Framebuffer +{ +public: + Framebuffer() = default; + ~Framebuffer(); + + void SetDefaultContext(dp::OGLContext * context); + void SetSize(uint32_t width, uint32_t height); + + void Enable(); + void Disable(); + + uint32_t GetTextureId() const; + bool IsSupported() const { return m_isSupported; } +private: + void Destroy(); + + uint32_t m_width = 0; + uint32_t m_height = 0; + + uint32_t m_colorTextureId = 0; + uint32_t m_depthTextureId = 0; + uint32_t m_framebufferId = 0; + + dp::OGLContext * m_defaultContext = 0; + + bool m_isSupported = true; +}; +} // namespace dp |