16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 00:09:18 +02:00

splittable python windows

This commit is contained in:
milek7
2019-03-13 01:03:38 +01:00
parent 38ea3f5737
commit ef82aa8589
11 changed files with 179 additions and 135 deletions

32
pythonscreenviewer.h Normal file
View File

@@ -0,0 +1,32 @@
#include "renderer.h"
#include <GLFW/glfw3.h>
class python_screen_viewer
{
struct window_config {
GLFWwindow *window;
glm::ivec2 size;
glm::vec2 offset;
glm::vec2 scale;
std::unique_ptr<gl::ubo> ubo;
};
std::vector<window_config> m_windows;
GLuint m_source;
std::shared_ptr<std::thread> m_renderthread;
std::unique_ptr<gl::program> m_shader;
gl::scene_ubs m_ubs;
std::atomic_bool m_exit = false;
void threadfunc();
public:
python_screen_viewer(GLuint src, std::string name);
~python_screen_viewer();
void notify_window_size(GLFWwindow *window, int w, int h);
};