Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
083ef7bf
Commit
083ef7bf
authored
Oct 20, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP #576: dereference numpy arrays after creating VBOs
parent
3c2bbdc1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
actors.py
printrun/gl/libtatlin/actors.py
+9
-0
No files found.
printrun/gl/libtatlin/actors.py
View file @
083ef7bf
...
...
@@ -689,6 +689,12 @@ class GcodeModel(Model):
self
.
vertex_buffer
=
numpy2vbo
(
self
.
vertices
,
use_vbos
=
self
.
use_vbos
)
self
.
vertex_color_buffer
=
numpy2vbo
(
self
.
colors
,
use_vbos
=
self
.
use_vbos
)
self
.
vertex_normal_buffer
=
numpy2vbo
(
self
.
normals
,
use_vbos
=
self
.
use_vbos
)
# Tentative memory optimization: delete numpy arrays after creating VBOs
self
.
travels
=
None
self
.
indices
=
None
self
.
vertices
=
None
self
.
colors
=
None
self
.
normals
=
None
self
.
buffers_created
=
True
def
display
(
self
,
mode_2d
=
False
):
...
...
@@ -949,6 +955,9 @@ class GcodeModelLight(Model):
self
.
vertex_color_buffer
.
delete
()
self
.
vertex_buffer
=
numpy2vbo
(
self
.
vertices
,
use_vbos
=
self
.
use_vbos
)
self
.
vertex_color_buffer
=
numpy2vbo
(
self
.
colors
,
use_vbos
=
self
.
use_vbos
)
# each pair of vertices shares the color
# Tentative memory optimization: delete numpy arrays after creating VBOs
self
.
vertices
=
None
self
.
colors
=
None
self
.
buffers_created
=
True
def
display
(
self
,
mode_2d
=
False
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment