openframeworks / openframeworks/openFrameworks

Disabling indices on ofMesh does not work without clearing indices

Open
#5,234 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

When drawing an instance of ofMesh in different modes – i.e. OF_PRIMITIVE_TRIANGLES and OF_PRIMITIVE_LINE_LOOP – disabling the indices necessary for the former mode via ofMesh::disableIndices() does not yield the expected result in the latter mode. In order to get the expected result in mode OF_PRIMITIVE_LINE_LOOP you must also clear the indices via ofMesh::clearIndices().

Details and drop-in code example can be found here: https://forum.openframeworks.cc/t/disabling-indices-on-ofmesh/24332

The described behavior can be reproduced with OF release 0.9.3 and OF master branch.

Tested with:
OS X 10.10.5
XCode 7.2.1

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 with the ofMesh::disableIndices() and ofMesh::clearIndices() behavior described in the issue, then review the linked forum reproduction using OF_PRIMITIVE_TRIANGLES and OF_PRIMITIVE_LINE_LOOP. Confirm the behavior on the master branch and identify the relevant mesh drawing path. Done means disabling indices alone produces the expected line-loop result without requiring clearIndices().

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.