# How to draw a line in p5 v1.0 webgl (bezier)

**URL:** https://discourse.processing.org/t/how-to-draw-a-line-in-p5-v1-0-webgl-bezier/43195
**Category:** Coding Questions
**Created:** [November 12, 2023, 1:53am UTC](https://discourse.processing.org/t/how-to-draw-a-line-in-p5-v1-0-webgl-bezier/43195 "2023-11-12T01:53:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![chaseLoop](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@chaseLoop](https://discourse.processing.org/u/chaseLoop)
#### Post date: [November 12, 2023, 1:53am UTC](https://discourse.processing.org/t/how-to-draw-a-line-in-p5-v1-0-webgl-bezier/43195/1 "2023-11-12T01:53:15Z")

</div>

I’m stuck with P5 v1.0’s webgl mode where each line turns out to be a plane. How to remove the white fill for the lines? I tried noFill() which doesn’t work. Also tried filling with a color at full transparency. That works only to some extend, but also create crazy artifacts that occlude other shapes.

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [November 12, 2023, 5:47am UTC](https://discourse.processing.org/t/how-to-draw-a-line-in-p5-v1-0-webgl-bezier/43195/2 "2023-11-12T05:47:26Z")

</div>

Hi @chaseLoop,

could you please provide some example code which demonstrates the issue?

Cheers  
— mnse

PS: lines usually will be modified by methods containing _`*stroke*`_ ie:

> **[reference | p5.js](https://p5js.org/reference/#/p5/stroke)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

> **[reference | p5.js](https://p5js.org/reference/#/p5/strokeWeight)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

---

<div class="post-metadata">

### Author: ![chaseLoop](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@chaseLoop](https://discourse.processing.org/u/chaseLoop)
#### Post date: [November 14, 2023, 4:25am UTC](https://discourse.processing.org/t/how-to-draw-a-line-in-p5-v1-0-webgl-bezier/43195/3 "2023-11-14T04:25:02Z")

</div>

here are example code with show lines with white fill in v1.0.0. noFill() doesn’t work. and adding a transparent fill could still cause artifacts when there are multiple lines.

```auto

function setup() {
  createCanvas(400, 400, WEBGL);
}

function draw() {
  background(220);
  
    bezier(0,0,
          100,10,
          200,10,
          300,0)

}

```

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [November 14, 2023, 3:50pm UTC](https://discourse.processing.org/t/how-to-draw-a-line-in-p5-v1-0-webgl-bezier/43195/4 "2023-11-14T15:50:28Z")

</div>

Hi @chaseLoop

You mean you are using p5js v1.0.0 and that doesn’t work in this case ? The current version is v1.8.0 which had many many fixes since !?

I’ve tested with v1.8.0 and everything looks well…

Cheers  
— mnse
