#pragma once // windows.h must come before GL/GL.h here. // clang format would change this, effectively rendering the build broken. // clang-format off #include #ifdef _WIN32 #include #include #else #define GL_SILENCE_DEPRECATION #if defined(IMGUI_IMPL_OPENGL_ES2) #include #endif #include // Will drag system OpenGL headers #endif #include "imaging/Image.hpp" // clang-format on namespace pixelarium::render { static void matToTexture(const cv::Mat& image, GLuint* texture); class CvMatRender { public: CvMatRender() = default; explicit CvMatRender(const std::shared_ptr& img); GLuint* Render(); GLuint* Render(float factor); GLuint* Render(size_t width, size_t height); private: cv::Mat _img; std::shared_ptr _base; GLuint _texture; }; } // namespace pixelarium::render