strange pfFog-error

New Message Reply Date view Thread view Subject view Author view

Michael Haller (michael.haller++at++jk.uni-linz.ac.at)
Thu, 30 Dec 1999 14:07:04 +0100


Hi all,

I want to use the class pfFog in combination with pfEarthSky. Moreover, I
want to switch off the fog-functionality. How can realize this in C++?
I have given a look at perfly.C - without success. In C I had the function
pfESkyFog - But in C++ I do not have this class. Instead of it I have only
pfEarthSky.
Is there another simple example (not fog.C and fog.c of the sample-list).
The following code produces the following error:

PF Fatal/SysErr: _pfDirtCheck: pfRealloc of 0 bytes returned
NULL.

And as I found out, the error is in the line fog->apply

Any help?

void VREnvironment::SetFog(float r, float g, float b) {
    pfFog *fog = new pfFog;
    fog->setFogType(PFFOG_VTX_LIN);
    fog->setColor(1.0f, 0.0f, 0.0f);
    fog->apply();
    pfEnable (PFEN_FOG);
    pfOverride(PFSTATE_FOG | PFSTATE_ENFOG, PF_ON);
}

This method will be called in the application after the initialization phase.

Thanks in advance,
Mike
----------------------------------------------------------------------------
-----------------
FAW, University of Linz
AUSTRIA


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Dec 30 1999 - 05:04:34 PST

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