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:
32
pythonscreenviewer.h
Normal file
32
pythonscreenviewer.h
Normal 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);
|
||||
};
|
||||
Reference in New Issue
Block a user