# Rendering mesh with stroke effect

**URL:** <https://openrndr.discourse.group/t/rendering-mesh-with-stroke-effect/143>\
**Category:** How to?\
**Created:** [August 2, 2020, 6:08pm UTC](https://openrndr.discourse.group/t/rendering-mesh-with-stroke-effect/143 "2020-08-02T18:08:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yann](https://avatars.discourse-cdn.com/v4/letter/y/bc79bd/32.png) [@Yann](https://openrndr.discourse.group/u/Yann)\
**Post date:** [August 2, 2020, 6:08pm UTC](https://openrndr.discourse.group/t/rendering-mesh-with-stroke-effect/143/1 "2020-08-02T18:08:00Z")

</div>

What is the preferred way to render a 3D mesh with a stroke effect between vertices?

for example, this seems to be built in to processing (and related frameworks). Here is an example from [p5js](https://editor.p5js.org/):

```
function setup() {
  createCanvas(640, 360, WEBGL);
}

function draw() {
  background(0);
  orbitControl();
  stroke(255);
  strokeWeight(2.0);
  fill(80, 10, 120);
  box(150);
}

```

I believe OpenGL has a wireframe mode, but it only works without fill (the faces are transparent).

I think I could achieve this effect by first rendering the mesh normally and then rendering some LineSegments between the desired vertices, but I’m wondering if there is a better way.

By the way, I also tried the ContourRenderer in orx-dnk3, and it’s very cool! but not quite the same effect:  
[https://www.instagram.com/p/CC1IYjFhSIN/?utm\_source=ig\_web\_copy\_link](https://www.instagram.com/p/CC1IYjFhSIN/?utm_source=ig_web_copy_link)
