More work on heightmap probing.
This commit is contained in:
@@ -12,14 +12,15 @@ class shader_program;
|
||||
class program_renderer {
|
||||
public:
|
||||
void update(const program& pgm, const machine& cnc);
|
||||
void render(glm::mat4 mvp, glm::vec2 viewport_size);
|
||||
void render(glm::mat4 model, glm::mat4 view, glm::mat4 projection, glm::mat3 normal_mat, glm::vec2 viewport_size);
|
||||
|
||||
glm::vec3 get_extents_min() const { return min_pos; };
|
||||
|
||||
glm::vec3 get_extents_max() const { return max_pos; };
|
||||
|
||||
void update_grid(float from_x, float from_y, float to_x, float to_y, int resolution);
|
||||
private:
|
||||
GLsizei build_vbo(const grbl::program& pgm);
|
||||
GLsizei update_model_vbo(const grbl::program& pgm);
|
||||
|
||||
GLuint spindle_vbo_id;
|
||||
GLuint spindle_vao_id;
|
||||
@@ -30,16 +31,21 @@ private:
|
||||
GLuint extents_vbo_id;
|
||||
GLuint extents_vao_id;
|
||||
|
||||
GLuint heightmap_vbo_id;
|
||||
GLuint heightmap_vao_id;
|
||||
|
||||
shader_program *shader = nullptr;
|
||||
shader_program *heightmap_shader = nullptr;
|
||||
|
||||
bool initialized = false;
|
||||
|
||||
glm::vec3 min_pos, max_pos, spindle_pos;
|
||||
GLsizei vertices_count, spindle_vertices_count, extents_vertices_count;
|
||||
GLsizei vertices_count, spindle_vertices_count, extents_vertices_count, heightmap_vertices_count;
|
||||
|
||||
void initialize_program_buffers();
|
||||
void initialize_spindle_buffers();
|
||||
void initialize_extents_buffers();
|
||||
void initialize_heightmap_buffers();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user