diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-12-30 22:24:54 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-12-30 22:24:54 +0400 |
commit | d383c324131f6b295512403c367dc3b932a1de90 (patch) | |
tree | 5ed5df8f5511bb939eeef789ceb7bdc75de6d469 /source/blender/gpu/GPU_buffers.h | |
parent | 2e9cb31c02378fd5b9b3f26f6f26501d1aa999a2 (diff) |
Add GPU_buffers support for drawing dynamic topology nodes
The GPU interface for PBVH drawing gets a new pair of build/update
buffers functions for drawing BMFaces and BMVerts.
TODO: the diffuse color is hardcoded to 0.8 gray rather than using
material color.
TODO: only VBO drawing is implemented, no immediate mode.
Diffstat (limited to 'source/blender/gpu/GPU_buffers.h')
-rw-r--r-- | source/blender/gpu/GPU_buffers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 36fbd818f11..70ca44c2a3a 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -39,12 +39,15 @@ #define DEBUG_VBO(X) #endif +struct BMesh; struct CCGElem; struct CCGKey; struct CustomData; struct DMFlagMat; struct DerivedMesh; +struct GHash; struct GPUVertPointLink; +struct PBVH; typedef struct GPUBuffer { int size; /* in bytes */ @@ -168,6 +171,14 @@ void GPU_update_mesh_buffers(GPU_Buffers *buffers, MVert *mvert, GPU_Buffers *GPU_build_grid_buffers(int *grid_indices, int totgrid, unsigned int **grid_hidden, int gridsize); +GPU_Buffers *GPU_build_bmesh_buffers(int smooth_shading); + +void GPU_update_bmesh_buffers(GPU_Buffers *buffers, + struct BMesh *bm, + struct GHash *bm_faces, + struct GHash *bm_unique_verts, + struct GHash *bm_other_verts); + void GPU_update_grid_buffers(GPU_Buffers *buffers, struct CCGElem **grids, const struct DMFlagMat *grid_flag_mats, int *grid_indices, int totgrid, const struct CCGKey *key, |