toggling between noLights and PointLight in draw() does not behave as expected #3546

Closed
hype opened this Issue Aug 7, 2015 · 9 comments

Comments

Projects
None yet
3 participants
@hype

hype commented Aug 7, 2015

void setup() {
    size(600,600,P3D);
    background(153);    
}

void draw() {

    noStroke();
    fill(#FF3300); // orange
    rect(100, 100, 100, 100);

    pointLight(255, 0, 0,   width/2, 0, 0);
    pointLight(0, 255, 0,   width/2, height/2, 0);
    pointLight(0, 0, 255,   width/2, height, 0);

    // lets pretend you rock some 3D drawables here

    // now lets turn lights off,
    // so our rect gets displayed as expected, when draw() runs again
    noLights();
}

running this sketch our orange rect() is actually displayed as black... the only way I could get the orange rect to display as expected was actually to precede it with lights() which is odd.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 7, 2015

Member

Are you using beta 1? There were lighting changes there.

Member

benfry commented Aug 7, 2015

Are you using beta 1? There were lighting changes there.

@hype

This comment has been minimized.

Show comment
Hide comment
@hype

hype Aug 7, 2015

@benfry yes sir. what's new convention?

hype commented Aug 7, 2015

@benfry yes sir. what's new convention?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 7, 2015

Member

@codeanticode or @JakubValtar will need to check on this one. The change was that geometry is properly flushed whenever a lighting change happens, so this may be a new problem that was introduced or bad syntax revealed by that fix.

Member

benfry commented Aug 7, 2015

@codeanticode or @JakubValtar will need to check on this one. The change was that geometry is properly flushed whenever a lighting change happens, so this may be a new problem that was introduced or bad syntax revealed by that fix.

@hype

This comment has been minimized.

Show comment
Hide comment
@hype

hype Aug 7, 2015

@benfry @codeanticode @JakubValtar understood... I'm just finishing up a new class (41 files) which has lighting as a major component... if you'd like for me to zip up examples... please let me know whom and to where to send.

hype commented Aug 7, 2015

@benfry @codeanticode @JakubValtar understood... I'm just finishing up a new class (41 files) which has lighting as a major component... if you'd like for me to zip up examples... please let me know whom and to where to send.

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Aug 7, 2015

Member

It is a regression introduced by #3533. Should be fixed with a640a9e and 47424b2

Member

codeanticode commented Aug 7, 2015

It is a regression introduced by #3533. Should be fixed with a640a9e and 47424b2

@codeanticode codeanticode added the opengl label Aug 7, 2015

@codeanticode codeanticode self-assigned this Aug 7, 2015

@hype

This comment has been minimized.

Show comment
Hide comment
@hype

hype Aug 7, 2015

@codeanticode if/when there's a new PUSH I can PULL, I can stress test against a bunch sketches.

hype commented Aug 7, 2015

@codeanticode if/when there's a new PUSH I can PULL, I can stress test against a bunch sketches.

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Aug 7, 2015

Member

@hype the simple test you posted initially works after the fixes. Just pull the latest revision from the repo, and let me know how your more detailed tests go. Thank you!

Member

codeanticode commented Aug 7, 2015

@hype the simple test you posted initially works after the fixes. Just pull the latest revision from the repo, and let me know how your more detailed tests go. Thank you!

@hype

This comment has been minimized.

Show comment
Hide comment
@hype

hype Aug 7, 2015

@codeanticode thanks Andres.

hype commented Aug 7, 2015

@codeanticode thanks Andres.

benfry added a commit that referenced this issue Aug 7, 2015

@hype

This comment has been minimized.

Show comment
Hide comment
@hype

hype Aug 8, 2015

ok to close this ?

hype commented Aug 8, 2015

ok to close this ?

@hype hype closed this Aug 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment