diff options
author | bubnikv <bubnikv@gmail.com> | 2019-08-26 12:12:48 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2019-08-26 12:12:48 +0300 |
commit | 85d9a165636617c76d30be54a1cd99bd4e5663b0 (patch) | |
tree | f7e23dc13ed98bb6eef548ba40851e54a33216c4 /src/slic3r/GUI/3DScene.hpp | |
parent | 9cbfe8f5ef6f24ea88f8cdb74dcf866bfd98028d (diff) |
Fixed a bug, where the GL context was not being activated with _set_current()
as _set_current() tested for visibility of the window on the screen.
Improved memory management by:
1) Allocating small (around 3MB) vertex buffers to be sent to the GPU.
2) Passing the small vertex buffers to the GPU as quickly as possible.
A bit of copy / paste refactoring into common functions.
Diffstat (limited to 'src/slic3r/GUI/3DScene.hpp')
-rw-r--r-- | src/slic3r/GUI/3DScene.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index 5acc85217..8c1d68f77 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -522,6 +522,9 @@ public: int load_wipe_tower_preview( int obj_idx, float pos_x, float pos_y, float width, float depth, float height, float rotation_angle, bool size_unknown, float brim_width, bool opengl_initialized); + GLVolume* new_toolpath_volume(const float *rgba, size_t reserve_vbo_floats = 0); + GLVolume* new_nontoolpath_volume(const float *rgba, size_t reserve_vbo_floats = 0); + // Render the volumes by OpenGL. void render(ERenderType type, bool disable_cullface, const Transform3d& view_matrix, std::function<bool(const GLVolume&)> filter_func = std::function<bool(const GLVolume&)>()) const; |