#pragma once #ifndef _OPENGL_TEXTURE_BUFFER_H #define _OPENGL_TEXTURE_BUFFER_H #include #include #include #include #include "GL/GL.h" #include "GL/GLu.h" #include "GL/wglext.h" #include #include typedef uint32_t GLuint; namespace polyvox_filament { class OpenGLTextureBuffer { public: OpenGLTextureBuffer( flutter::PluginRegistrarWindows* pluginRegistrar, flutter::TextureRegistrar* textureRegistrar, std::unique_ptr> result, uint32_t width, uint32_t height, HGLRC context, std::shared_ptr renderMutex); ~OpenGLTextureBuffer(); GLuint glTextureId = 0; int64_t flutterTextureId = 0; std::unique_ptr pixelBuffer; std::unique_ptr pixelData; std::unique_ptr texture; private: flutter::PluginRegistrarWindows* _pluginRegistrar; flutter::TextureRegistrar* _textureRegistrar; uint32_t _width = 0; uint32_t _height = 0; HGLRC _context = NULL; bool logged = false; std::shared_ptr _renderMutex; }; } #endif // _OPENGL_TEXTURE_BUFFER_H