Browse Source

Fix predrawn curves having zero width

ssao
Aleksey Olokhtonov 6 months ago
parent
commit
01560389af
  1. 2
      client/client_recv.js
  2. 1
      client/webgl_draw.js

2
client/client_recv.js

@ -184,7 +184,7 @@ function handle_event(state, context, event, options = {}) {
} }
case EVENT.PREDRAW: { case EVENT.PREDRAW: {
geometry_add_point(state, context, event.user_id, {'x': event.x, 'y': event.y}, 0.5); // TODO: event.pressure geometry_add_point(state, context, event.user_id, {'x': event.x, 'y': event.y, 'pressure': 128}, false); // TODO: add pressure to predraw events
need_draw = true; need_draw = true;
break; break;
} }

1
client/webgl_draw.js

@ -251,6 +251,7 @@ async function draw(state, context, animate, ts) {
gl.vertexAttribDivisor(locations['a_stroke_id'], 0); gl.vertexAttribDivisor(locations['a_stroke_id'], 0);
gl.vertexAttribDivisor(locations['a_pressure'], 0); gl.vertexAttribDivisor(locations['a_pressure'], 0);
} }
// Dynamic strokes should be drawn above static strokes // Dynamic strokes should be drawn above static strokes
gl.clear(gl.DEPTH_BUFFER_BIT); gl.clear(gl.DEPTH_BUFFER_BIT);

Loading…
Cancel
Save