Clean up several stray warnings that have accumulated.
This commit is contained in:
@@ -41,7 +41,7 @@ double fast_exp(double val) {
|
||||
const double a = 1048576/M_LN2;
|
||||
const double b_c = 1072632447; /* 1072693248 - 60801 */
|
||||
|
||||
_eco.n.i = a*val + b_c;
|
||||
_eco.n.i = (int)(a*val + b_c);
|
||||
|
||||
return _eco.d;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ SGMaterial::read_properties( const string &fg_root, const SGPropertyNode * props
|
||||
{
|
||||
// Gather the path(s) to the texture(s)
|
||||
vector<SGPropertyNode_ptr> textures = props->getChildren("texture");
|
||||
for (int i = 0; i < textures.size(); i++)
|
||||
for (unsigned int i = 0; i < textures.size(); i++)
|
||||
{
|
||||
string tname = textures[i]->getStringValue();
|
||||
if (tname == "") {
|
||||
@@ -227,7 +227,7 @@ SGMaterial::build_ssg_state( bool defer_tex_load )
|
||||
{
|
||||
GLenum shade_model = GL_SMOOTH;
|
||||
|
||||
for (int i = 0; i < _status.size(); i++)
|
||||
for (unsigned int i = 0; i < _status.size(); i++)
|
||||
{
|
||||
ssgSimpleState *state = new ssgSimpleState();
|
||||
state->ref();
|
||||
|
||||
@@ -217,7 +217,7 @@ private:
|
||||
vector<_internal_state> _status;
|
||||
|
||||
// Round-robin counter
|
||||
int _current_ptr;
|
||||
unsigned int _current_ptr;
|
||||
|
||||
// texture size
|
||||
double xsize, ysize;
|
||||
|
||||
@@ -174,56 +174,6 @@ static int gen_taxiway_dir_light_map( int r, int g, int b, int alpha ) {
|
||||
}
|
||||
|
||||
|
||||
// generate the directional vasi light environment texture map
|
||||
static int gen_vasi_light_map_old() {
|
||||
const int env_tex_res = 256;
|
||||
int half_res = env_tex_res / 2;
|
||||
|
||||
static unsigned char env_map[env_tex_res][env_tex_res][4];
|
||||
GLuint tex_name;
|
||||
|
||||
for ( int i = 0; i < env_tex_res; ++i ) {
|
||||
for ( int j = 0; j < env_tex_res; ++j ) {
|
||||
double x = (i - half_res) / (double)half_res;
|
||||
double y = (j - half_res) / (double)half_res;
|
||||
double dist = sqrt(x*x + y*y);
|
||||
if ( dist > 1.0 ) { dist = 1.0; }
|
||||
double bright = cos( dist * SGD_PI_2 );
|
||||
|
||||
// top half white, bottom half red
|
||||
env_map[i][j][0] = 255;
|
||||
if ( i > half_res ) {
|
||||
// white
|
||||
env_map[i][j][1] = 255;
|
||||
env_map[i][j][2] = 255;
|
||||
} else if ( i == half_res - 1 || i == half_res ) {
|
||||
// pink
|
||||
env_map[i][j][1] = 127;
|
||||
env_map[i][j][2] = 127;
|
||||
} else {
|
||||
// red
|
||||
env_map[i][j][1] = 0;
|
||||
env_map[i][j][2] = 0;
|
||||
}
|
||||
env_map[i][j][3] = (int)(bright * 255);
|
||||
}
|
||||
}
|
||||
|
||||
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
|
||||
glGenTextures( 1, &tex_name );
|
||||
glBindTexture( GL_TEXTURE_2D, tex_name );
|
||||
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, env_tex_res, env_tex_res, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, env_map);
|
||||
|
||||
return tex_name;
|
||||
}
|
||||
|
||||
|
||||
// Load a library of material properties
|
||||
bool SGMaterialLib::load( const string &fg_root, const string& mpath ) {
|
||||
|
||||
|
||||
@@ -498,14 +498,14 @@ SGBlendAnimation::SGBlendAnimation( SGPropertyNode *prop_root,
|
||||
SGPropertyNode_ptr props )
|
||||
: SGAnimation(props, new ssgTransform),
|
||||
_prop((SGPropertyNode *)prop_root->getNode(props->getStringValue("property", "/null"), true)),
|
||||
_table(read_interpolation_table(props)),
|
||||
_prev_value(1.0),
|
||||
_offset(props->getDoubleValue("offset", 0.0)),
|
||||
_factor(props->getDoubleValue("factor", 1.0)),
|
||||
_table(read_interpolation_table(props)),
|
||||
_has_min(props->hasValue("min")),
|
||||
_min(props->getDoubleValue("min", 0.0)),
|
||||
_has_max(props->hasValue("max")),
|
||||
_max(props->getDoubleValue("max", 1.0)),
|
||||
_prev_value(1.0)
|
||||
_max(props->getDoubleValue("max", 1.0))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
#include "sphere.hxx"
|
||||
#include "oursun.hxx"
|
||||
|
||||
static double sun_exp2_punch_through;
|
||||
|
||||
// Set up sun rendering call backs
|
||||
static int sgSunOrbPreDraw( ssgEntity *e ) {
|
||||
/* cout << endl << "Sun orb pre draw" << endl << "----------------"
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
|
||||
static double sun_exp2_punch_through;
|
||||
|
||||
class SGSun {
|
||||
|
||||
ssgTransform *sun_transform;
|
||||
|
||||
Reference in New Issue
Block a user