Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-08-05 15:15:46 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-08-05 15:15:46 +0300
commit0ea45676d026b2d8c43809f2dc5394c73298ee3f (patch)
treeec143188a5afb00a49726036347f28e6ecea8523 /source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c
parenta474409f0bf04fb2b87d7a914ea3f18d97623cdc (diff)
OpenSubdiv: Fix crash happening when disabling Use OpenSubdiv option
The issue was caused by the changes from this morning.
Diffstat (limited to 'source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c')
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c
index c7526521963..81f9ea6dc16 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c
@@ -863,4 +863,17 @@ void ccgSubSurf__sync_opensubdiv(CCGSubSurf *ss)
#endif
}
+void ccgSubSurf_free_osd_mesh(CCGSubSurf *ss)
+{
+ if (ss->osd_mesh != NULL) {
+ /* TODO(sergey): Make sure free happens form the main thread! */
+ openSubdiv_deleteOsdGLMesh(ss->osd_mesh);
+ ss->osd_mesh = NULL;
+ }
+ if (ss->osd_vao != 0) {
+ glDeleteVertexArrays(1, &ss->osd_vao);
+ ss->osd_vao = 0;
+ }
+}
+
#endif /* WITH_OPENSUBDIV */