diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-09 12:49:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-09 12:49:27 +0300 |
commit | a5b4b0f21c1ae8c96e4fea9abdcfac2fab1cf300 (patch) | |
tree | 0658d8bdfb8ec03652aa04f82ee8a4d243ec6370 /source/blender/gpu/intern/gpu_batch.c | |
parent | d68f698cf0321477c0734474150eb4bc43c4e85f (diff) | |
parent | abcda06934aba054de8540b66b13c2bbc5f8f515 (diff) |
Merge branch '28' into custom-manipulatorscustom-manipulators
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c index 92bab13dcb5..5d347fc80e8 100644 --- a/source/blender/gpu/intern/gpu_batch.c +++ b/source/blender/gpu/intern/gpu_batch.c @@ -31,7 +31,7 @@ #include "GPU_batch.h" #include "gpu_shader_private.h" -void Batch_set_builtin_program(Gwn_Batch *batch, GPUBuiltinShader shader_id) +void GWN_batch_program_set_builtin(Gwn_Batch *batch, GPUBuiltinShader shader_id) { GPUShader *shader = GPU_shader_get_builtin_shader(shader_id); GWN_batch_program_set(batch, shader->program, shader->interface); @@ -93,7 +93,7 @@ static Gwn_Batch *batch_sphere(int lat_res, int lon_res) } } - return GWN_batch_create(GWN_PRIM_TRIS, vbo, NULL); + return GWN_batch_create_ex(GWN_PRIM_TRIS, vbo, NULL, GWN_BATCH_OWNS_VBO); } static Gwn_Batch *batch_sphere_wire(int lat_res, int lon_res) @@ -125,10 +125,10 @@ static Gwn_Batch *batch_sphere_wire(int lat_res, int lon_res) } } - return GWN_batch_create(GWN_PRIM_LINES, vbo, NULL); + return GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO); } -Gwn_Batch *Batch_get_sphere(int lod) +Gwn_Batch *GPU_batch_preset_sphere(int lod) { BLI_assert(lod >= 0 && lod <= 2); @@ -140,7 +140,7 @@ Gwn_Batch *Batch_get_sphere(int lod) return sphere_high; } -Gwn_Batch *Batch_get_sphere_wire(int lod) +Gwn_Batch *GPU_batch_preset_sphere_wire(int lod) { BLI_assert(lod >= 0 && lod <= 1); @@ -163,9 +163,9 @@ void gpu_batch_init(void) void gpu_batch_exit(void) { - GWN_batch_discard_all(sphere_low); - GWN_batch_discard_all(sphere_med); - GWN_batch_discard_all(sphere_high); - GWN_batch_discard_all(sphere_wire_low); - GWN_batch_discard_all(sphere_wire_med); + GWN_batch_discard(sphere_low); + GWN_batch_discard(sphere_med); + GWN_batch_discard(sphere_high); + GWN_batch_discard(sphere_wire_low); + GWN_batch_discard(sphere_wire_med); } |