|
|
@ -137,7 +137,7 @@ function draw(state, context) { |
|
|
|
gl.vertexAttribPointer(locations['a_a'], 2, gl.FLOAT, false, 2 * 4, 0); |
|
|
|
gl.vertexAttribPointer(locations['a_a'], 2, gl.FLOAT, false, 2 * 4, 0); |
|
|
|
gl.vertexAttribPointer(locations['a_b'], 2, gl.FLOAT, false, 2 * 4, 2 * 4); |
|
|
|
gl.vertexAttribPointer(locations['a_b'], 2, gl.FLOAT, false, 2 * 4, 2 * 4); |
|
|
|
gl.vertexAttribIPointer(locations['a_stroke_id'], 1, gl.INT, 4, context.instance_data_points.size * 4); |
|
|
|
gl.vertexAttribIPointer(locations['a_stroke_id'], 1, gl.INT, 4, context.instance_data_points.size * 4); |
|
|
|
gl.vertexAttribPointer(locations['a_pressure'], 1, gl.UNSIGNED_BYTE, true, 1, context.instance_data_points.size * 4 + context.instance_data_ids.size * 4); |
|
|
|
gl.vertexAttribPointer(locations['a_pressure'], 2, gl.UNSIGNED_BYTE, true, 1, context.instance_data_points.size * 4 + context.instance_data_ids.size * 4); |
|
|
|
|
|
|
|
|
|
|
|
gl.vertexAttribDivisor(locations['a_a'], 1); |
|
|
|
gl.vertexAttribDivisor(locations['a_a'], 1); |
|
|
|
gl.vertexAttribDivisor(locations['a_b'], 1); |
|
|
|
gl.vertexAttribDivisor(locations['a_b'], 1); |
|
|
@ -181,7 +181,7 @@ function draw(state, context) { |
|
|
|
gl.vertexAttribPointer(locations['a_a'], 2, gl.FLOAT, false, 2 * 4, 0); |
|
|
|
gl.vertexAttribPointer(locations['a_a'], 2, gl.FLOAT, false, 2 * 4, 0); |
|
|
|
gl.vertexAttribPointer(locations['a_b'], 2, gl.FLOAT, false, 2 * 4, 2 * 4); |
|
|
|
gl.vertexAttribPointer(locations['a_b'], 2, gl.FLOAT, false, 2 * 4, 2 * 4); |
|
|
|
gl.vertexAttribIPointer(locations['a_stroke_id'], 1, gl.INT, 4, context.dynamic_instance_points.size * 4); |
|
|
|
gl.vertexAttribIPointer(locations['a_stroke_id'], 1, gl.INT, 4, context.dynamic_instance_points.size * 4); |
|
|
|
gl.vertexAttribPointer(locations['a_pressure'], 1, gl.UNSIGNED_BYTE, true, 1, context.dynamic_instance_points.size * 4 + context.dynamic_instance_ids.size * 4); |
|
|
|
gl.vertexAttribPointer(locations['a_pressure'], 2, gl.UNSIGNED_BYTE, true, 1, context.dynamic_instance_points.size * 4 + context.dynamic_instance_ids.size * 4); |
|
|
|
|
|
|
|
|
|
|
|
gl.vertexAttribDivisor(locations['a_a'], 1); |
|
|
|
gl.vertexAttribDivisor(locations['a_a'], 1); |
|
|
|
gl.vertexAttribDivisor(locations['a_b'], 1); |
|
|
|
gl.vertexAttribDivisor(locations['a_b'], 1); |
|
|
|