Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Background, mesh lighting

$
0
0

@alescc wrote:

Hi,
so I have this problem: if I enable (directional) lighting in draw(), the background color is completely dim, like everything else that is drawn before m_light.enable(). I thought light affected just the objects between ofLight begin() and end().

{
ofEnableDepthTest();
ofBackgroundGradient(ofColor::darkGoldenRod, ofColor::darkGrey);

m_light.enable();

m_material.begin();
ofPushMatrix();
ofTranslate( ofGetWidth()/2, ofGetHeight()/2, 0 );
ofSphere(0,0,0, 200);
ofPopMatrix();
m_material.end();

m_light.disable();
}

I am using the trunk, but this happens also with 0.8.4. Is there any way to draw the background without having it affected by the scene lighting?

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles