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:
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.c')
-rw-r--r--source/blender/gpu/intern/gpu_batch.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c
index 19229cde7f0..65a827febde 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(Batch* batch, GPUBuiltinShader shader_id)
+void Batch_set_builtin_program(Batch *batch, GPUBuiltinShader shader_id)
{
GPUShader *shader = GPU_shader_get_builtin_shader(shader_id);
Batch_set_program(batch, shader->program);
@@ -72,23 +72,23 @@ static Batch *batch_sphere(int lat_res, int lon_res)
}
vbo = VertexBuffer_create_with_format(&format);
- VertexBuffer_allocate_data(vbo, (lat_res-1) * lon_res * 6);
+ VertexBuffer_allocate_data(vbo, (lat_res - 1) * lon_res * 6);
vert = 0;
lon = 0.0f;
- for(int i = 0; i < lon_res; i++, lon += lon_inc) {
+ for (int i = 0; i < lon_res; i++, lon += lon_inc) {
lat = 0.0f;
- for(int j = 0; j < lat_res; j++, lat += lat_inc) {
+ for (int j = 0; j < lat_res; j++, lat += lat_inc) {
if (j != lat_res - 1) { /* Pole */
- batch_sphere_lat_lon_vert(lat+lat_inc, lon+lon_inc);
- batch_sphere_lat_lon_vert(lat+lat_inc, lon);
- batch_sphere_lat_lon_vert(lat, lon);
+ batch_sphere_lat_lon_vert(lat + lat_inc, lon + lon_inc);
+ batch_sphere_lat_lon_vert(lat + lat_inc, lon);
+ batch_sphere_lat_lon_vert(lat, lon);
}
if (j != 0) { /* Pole */
- batch_sphere_lat_lon_vert(lat, lon+lon_inc);
- batch_sphere_lat_lon_vert(lat+lat_inc, lon+lon_inc);
- batch_sphere_lat_lon_vert(lat, lon);
+ batch_sphere_lat_lon_vert(lat, lon + lon_inc);
+ batch_sphere_lat_lon_vert(lat + lat_inc, lon + lon_inc);
+ batch_sphere_lat_lon_vert(lat, lon);
}
}
}
@@ -108,19 +108,19 @@ static Batch *batch_sphere_wire(int lat_res, int lon_res)
}
vbo = VertexBuffer_create_with_format(&format);
- VertexBuffer_allocate_data(vbo, (lat_res * lon_res * 2) + ((lat_res-1) * lon_res * 2));
+ VertexBuffer_allocate_data(vbo, (lat_res * lon_res * 2) + ((lat_res - 1) * lon_res * 2));
vert = 0;
lon = 0.0f;
- for(int i = 0; i < lon_res; i++, lon += lon_inc) {
+ for (int i = 0; i < lon_res; i++, lon += lon_inc) {
lat = 0.0f;
- for(int j = 0; j < lat_res; j++, lat += lat_inc) {
- batch_sphere_lat_lon_vert(lat+lat_inc, lon);
- batch_sphere_lat_lon_vert(lat, lon);
+ for (int j = 0; j < lat_res; j++, lat += lat_inc) {
+ batch_sphere_lat_lon_vert(lat + lat_inc, lon);
+ batch_sphere_lat_lon_vert(lat, lon);
if (j != lat_res - 1) { /* Pole */
- batch_sphere_lat_lon_vert(lat+lat_inc, lon+lon_inc);
- batch_sphere_lat_lon_vert(lat+lat_inc, lon);
+ batch_sphere_lat_lon_vert(lat + lat_inc, lon + lon_inc);
+ batch_sphere_lat_lon_vert(lat + lat_inc, lon);
}
}
}