openframeworks / openframeworks/openFrameworks

ofBox 3dPrimitive winding order inconsistent

Open
#2,676 15 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

All primitives but ofBoxPrimitive appear to be in CW winding order, resulting in front faces to be culled instead of backfaces, when glCullFace is enabled.

test case:

https://gist.github.com/tgfrerer/7417271

test case render

screenshot 2013-11-11 17 46 57

related issues

We have dealt with winding isssues in the past, with #2263 being the most recent.
There is a vintage open issue addressing this: #745

thoughts

I could fix/unify this, but i think it's worth discussing which winding order we adopt as standard. I'd personally be for going with the OpenGL standard of CCW for front-facing triangles, which would mean to bring everyting in line with ofBoxPrimitive. my main reason being that these kind of special cases could make oF a bit more difficult to learn / and code harder to port.

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 linked gist and compare the winding order of ofBoxPrimitive with the other 3D primitives while glCullFace is enabled. Inspect the primitive implementations and related issue #2263; done requires an agreed standard and consistent front-face culling across the primitives.

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
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.