Light

New Message Reply Date view Thread view Subject view Author view

From: Mike (phoneix++at++sympatico.ca)
Date: 03/19/2000 15:33:34


Hi there I'm currently tring to turn off my light perhaps i'm not doing
this
correctly ? I've included a snipet of code any comments(positive that is
;')
would be appreciated
When someone selects a light the second time it should turn off?

void function () {
    static int flagForLight = 0;

    Shared->light = new pfLight;

    Shared->light->setSpotDir (0.0,0.0,0.0);
    Shared->light->setPos(0.0,1.0,1.0);

    Shared->lm = new pfLightModel;
    Shared->lm->setAmbient(0.0f,0.0f,1.0f);
    Shared->lm->apply;
    pfEnable(PFEN_LIGHTING);

    if(flagForLight == 0) {
        Shared->light->on();
        flagForLight = 1;
    else {
        Shared->light->off();
        flagForLight = 0;
    }

}

Thanks in Advance
Mike


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sun Mar 19 2000 - 15:34:24 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.