openframeworks / openframeworks/openFrameworks

ofLight::disable() does not call ofDisableLighting()

Open
#2,620 9 comments 0 reactions 1 assignee View on GitHub

@julapy is already working on this.

Since Oct 16, 2013.

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

Description

Since ofLight::disable() does not call ofDisableLighting(), the lighting affects certain drawing even after the light is disabled.

For example, in graphics/fontsExample, when ofLight is added in draw() as:

...
void testApp::draw(){
    ofLight light;
    light.enable();
    light.disable();
    // now I assume lighting is off

    ofSetColor(225);
...

then, it will affect the rest of the rendering, like this:
withlight

The original output is:
nolight

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.