Re: Turn off lighting

New Message Reply Date view Thread view Subject view Author view

Sylvain Mayer (mayer++at++cae.ca)
Thu, 08 Oct 1998 13:42:01 -0400


Javier Muņoz Lagaron wrote:

> Hello,
> We are developing a Performer application, and we were using a
> lightsource. But now, we want to view the textures without any light,
> with their real colors. How can we turn off lighting? We tried removing
> the lightsource, but we saw the scene very dark. The effect we want to
> reach is the same as Perfly with the lighting off option. Can anyone
> give us any clue?

If perfly is what you want, then look at its source code !!

        if (ViewState->lighting == LIGHTING_OFF)
        {
            pfOverride(PFSTATE_ENLIGHTING | PFSTATE_FRONTMTL, 0);
            pfDisable(PFEN_LIGHTING);
            pfOverride(PFSTATE_ENLIGHTING | PFSTATE_FRONTMTL, 1);
        }
        else
            pfOverride(PFSTATE_ENLIGHTING | PFSTATE_FRONTMTL, 0);

--
Sylvain Mayer, 3D Graphics Developer
Graphics Simulation Technology
Display Eng. & Special Projects
CAE Electronics Ltd. (http://www.cae.ca)
mailto:mayer++at++cae.ca
Tel: (514) 341-6780    Ext: 3065
Fax: (514) 734-5618

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Oct 08 1998 - 10:46:22 PDT

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