48 call_buffers_.field_force_buf.clear();
49 call_buffers_.field_wind_buf.clear();
50 call_buffers_.field_vortex_buf.clear();
51 call_buffers_.field_curve_buf.clear();
52 call_buffers_.field_sphere_limit_buf.clear();
53 call_buffers_.field_tube_limit_buf.clear();
54 call_buffers_.field_cone_limit_buf.clear();
62 if (!ob_ref.object->pd || !ob_ref.object->pd->forcefield) {
65 const select::ID select_id = res.select_id(ob_ref);
66 const Object *ob = ob_ref.object;
72 ob->object_to_world(), res.object_background_blend_color(ob_ref,
state), 1.0f);
74 float &size_x = matrix[0][3];
75 float &size_y = matrix[1][3];
76 float &size_z = matrix[2][3];
82 call_buffers_.field_force_buf.append(
data, select_id);
86 call_buffers_.field_wind_buf.append(
data, select_id);
89 size_y = (pd->
f_strength < 0.0f) ? -size_y : size_y;
90 call_buffers_.field_vortex_buf.append(
data, select_id);
97 matrix.
location() = ob->object_to_world().location();
99 call_buffers_.field_curve_buf.append(
data, select_id);
102 matrix.
location() = ob->object_to_world().location();
104 call_buffers_.field_sphere_limit_buf.append(
data, select_id);
106 matrix.
location() = ob->object_to_world().location();
118 call_buffers_.field_tube_limit_buf.append(
data, select_id);
124 call_buffers_.field_tube_limit_buf.append(
data, select_id);
134 call_buffers_.field_cone_limit_buf.append(
data, select_id);
142 call_buffers_.field_cone_limit_buf.append(
data, select_id);
147 size_x = size_y = size_z = pd->
maxdist;
148 call_buffers_.field_sphere_limit_buf.append(
data, select_id);
151 size_x = size_y = size_z = pd->
mindist;
152 call_buffers_.field_sphere_limit_buf.append(
data, select_id);
160 res.select_bind(ps_);
162 state.clipping_plane_count);
163 ps_.shader_set(res.shaders->extra_shape.get());
167 call_buffers_.field_force_buf.end_sync(ps_, res.shapes.field_force.get());
168 call_buffers_.field_wind_buf.end_sync(ps_, res.shapes.field_wind.get());
169 call_buffers_.field_vortex_buf.end_sync(ps_, res.shapes.field_vortex.get());
170 call_buffers_.field_curve_buf.end_sync(ps_, res.shapes.field_curve.get());
171 call_buffers_.field_sphere_limit_buf.end_sync(ps_, res.shapes.field_sphere_limit.get());
172 call_buffers_.field_tube_limit_buf.end_sync(ps_, res.shapes.field_tube_limit.get());
173 call_buffers_.field_cone_limit_buf.end_sync(ps_, res.shapes.field_cone_limit.get());