openframeworks / openframeworks/openFrameworks
Disabling indices on ofMesh does not work without clearing indices
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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