Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7795 in orxonox.OLD for branches


Ignore:
Timestamp:
May 24, 2006, 12:24:03 PM (19 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine: cloud tardis bugfix

Location:
branches/atmospheric_engine/src/lib/graphics/effects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc

    r7784 r7795  
    2020#include "glincl.h"
    2121//#include "graphics_engine.h"
     22#include <math.h>
    2223
    2324#include "parser/tinyxml/tinyxml.h"
     
    239240                        for (int y=0; y<256; y++)
    240241                        {
    241                                 float scale = 1 / pow(2, 3-octave);
     242                                float scale = 1 / pow(2.0f, (float) 3-octave);
    242243                                float noise = CloudEffect::interpolate(x*scale, y*scale , cloudMap32_c);
    243244
    244245                                //The octaves are added together with the proper weight factors.
    245246                                //You could replace pow(2, i) with 1<<i for faster computation
    246                                 cloudMap256[(y*256) + x] += noise / pow(2, octave);
     247                                cloudMap256[(y*256) + x] += noise / pow(2.0f, (float) octave);
    247248                        }
    248249}
  • branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc

    r7768 r7795  
    2626#define GLX_GLXEXT_PROTOTYPES
    2727#include <GL/glx.h>
    28 #include <GL/glut.h>
     28// #include <GL/glut.h>
    2929
    3030//#include <GL/glext.h> //OpenGL Extensions
Note: See TracChangeset for help on using the changeset viewer.