Introduced machine state handlers (check and run still need work).

Added proper init handler, fetching settings and parameters and exposing them to UI.
Added spindle rendering.
This commit is contained in:
2023-05-04 14:15:33 +03:00
parent a63d58a1ec
commit cacbe1b8aa
5 changed files with 842 additions and 200 deletions
+12 -2
View File
@@ -15,17 +15,27 @@ public:
void render(glm::mat4 mvp, glm::vec2 viewport_size);
glm::vec3 get_extents_min() const { return min_pos; };
glm::vec3 get_extents_max() const { return max_pos; };
private:
GLsizei build_vbo(const grbl::program& pgm);
GLuint spindle_vbo_id;
GLuint spindle_vao_id;
GLuint vbo_id;
GLuint vao_id;
shader_program *shader = nullptr;
bool initialized = false;
glm::vec3 min_pos, max_pos;
GLsizei vertices_count;
glm::vec3 min_pos, max_pos, spindle_pos;
GLsizei vertices_count, spindle_vertices_count;
void initialize_program_buffers();
void initialize_spindle_buffers();
};