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:
authorAntony Riakiotakis <kalast@gmail.com>2014-05-05 22:13:27 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-05-05 22:13:27 +0400
commit9a1c47de444eec6f6f73896aff8712c6847d328f (patch)
tree7b8fe758e814f0e743753e542fbaa137dc391405 /source/blender/gpu/GPU_buffers.h
parentfbfaa4770dea5cac9f8f7baa955d33fb219bd74b (diff)
Attempt to solve T39950,
Avoid filling up buffers when total buffer triangles are zero. Better still would be to tag a node as hidden when doing recreation of the PBVH tree by checking for any visible elements. Original bug report probably has to do with OpenGL doing something funky but hidden nodes should be tagged as hidden to completely avoid iterating for painting. This is to be done in a later commit. Also some naming cleanup for consistency, GPU_build_pbvh_mesh_buffers to GPU_build_mesh_pbvh_buffers.
Diffstat (limited to 'source/blender/gpu/GPU_buffers.h')
-rw-r--r--source/blender/gpu/GPU_buffers.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h
index 6c7945d69a2..096b2080b2b 100644
--- a/source/blender/gpu/GPU_buffers.h
+++ b/source/blender/gpu/GPU_buffers.h
@@ -166,19 +166,22 @@ bool GPU_buffer_legacy(struct DerivedMesh *dm);
/* Buffers for non-DerivedMesh drawing */
typedef struct GPU_PBVH_Buffers GPU_PBVH_Buffers;
-GPU_PBVH_Buffers *GPU_build_pbvh_mesh_buffers(int (*face_vert_indices)[4],
+/* build */
+GPU_PBVH_Buffers *GPU_build_mesh_pbvh_buffers(int (*face_vert_indices)[4],
struct MFace *mface, struct MVert *mvert,
int *face_indices, int totface);
-void GPU_update_mesh_pbvh_buffers(GPU_PBVH_Buffers *buffers, MVert *mvert,
- int *vert_indices, int totvert, const float *vmask,
- int (*face_vert_indices)[4], bool show_diffuse_color);
-
GPU_PBVH_Buffers *GPU_build_grid_pbvh_buffers(int *grid_indices, int totgrid,
unsigned int **grid_hidden, int gridsize);
GPU_PBVH_Buffers *GPU_build_bmesh_pbvh_buffers(int smooth_shading);
+/* update */
+
+void GPU_update_mesh_pbvh_buffers(GPU_PBVH_Buffers *buffers, MVert *mvert,
+ int *vert_indices, int totvert, const float *vmask,
+ int (*face_vert_indices)[4], bool show_diffuse_color);
+
void GPU_update_bmesh_pbvh_buffers(GPU_PBVH_Buffers *buffers,
struct BMesh *bm,
struct GSet *bm_faces,
@@ -191,9 +194,11 @@ void GPU_update_grid_pbvh_buffers(GPU_PBVH_Buffers *buffers, struct CCGElem **gr
int *grid_indices, int totgrid, const struct CCGKey *key,
bool show_diffuse_color);
+/* draw */
void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial,
bool wireframe);
+/* debug PBVH draw*/
void GPU_draw_pbvh_BB(float min[3], float max[3], bool leaf);
void GPU_end_draw_pbvh_BB(void);
void GPU_init_draw_pbvh_BB(void);