openframeworks / openframeworks/openFrameworks

ofMesh drawWireframe

Open
#1,744 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core section-3D
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

i came across an issue today when trying to draw a ofMesh wireframe.
when the wireframe is drawn inside ofGLRenderer, the draw mode is always set to GL_LINES.
but the result was an incomplete wireframe.
when i set the draw mode to GL_LINE_STRIP it was rendering correctly.

https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/gl/ofGLRenderer.cpp#L101

i think when choosing between GL_LINES and GL_LINE_STRIP to draw wireframes,
it depends on the way the triangle vertices are stores,
OF_PRIMITIVE_TRIANGLES, OF_PRIMITIVE_TRIANGLE_STRIP etc...
but this is a bit of a guess atm...
has anyone else come across this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in libs/openFrameworks/gl/ofGLRenderer.cpp around line 101, where wireframe drawing selects GL_LINES. Reproduce the incomplete ofMesh wireframe and compare GL_LINES with GL_LINE_STRIP for the primitive arrangements mentioned in the issue. Done means wireframes render completely with the relevant ofMesh draw modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.