1
0
Fork 0

Patches from Melchior Franz:

The first hunk might not be necessary, but the light_coverage property
was the only one that wasn't explicitly defaulted, which is unfair.  ;-)
   The second hunk adds the missing initialization to the init routine.
This is necessary, because (unlike the material entries from material.xml)
the generated light entries don't get the light coverage set. Yet
obj.cxx:795 reads this information out fot every leaf, although not needed
in the case of lights. Avoiding this isn't worth the trouble.
   The last hunk sets the missing normal_index. The POINTS branch in
gen_leaf was always called with this int_list empty, which made the normals
handling use data garbage.
This commit is contained in:
david 2002-03-26 16:10:53 +00:00
parent db7013c83a
commit 5b2df63f54
2 changed files with 3 additions and 1 deletions

View file

@ -119,7 +119,7 @@ FGNewMat::read_properties (const SGPropertyNode * props)
wrapu = props->getBoolValue("wrapu", true);
wrapv = props->getBoolValue("wrapv", true);
mipmap = props->getBoolValue("mipmap", true);
light_coverage = props->getDoubleValue("light-coverage");
light_coverage = props->getDoubleValue("light-coverage", 0.0);
ambient[0] = props->getDoubleValue("ambient/r", 0.0);
ambient[1] = props->getDoubleValue("ambient/g", 0.0);
@ -160,6 +160,7 @@ FGNewMat::init ()
wrapu = true;
wrapv = true;
mipmap = true;
light_coverage = 0.0;
texture_loaded = false;
refcount = 0;
for (int i = 0; i < 4; i++)

View file

@ -942,6 +942,7 @@ bool fgBinObjLoad( const string& path, const bool is_base,
material = tmp_mat;
}
vertex_index = pts_v[i];
normal_index = pts_n[i];
tex_index.clear();
ssgLeaf *leaf = gen_leaf( path, GL_POINTS, material,
nodes, normals, texcoords,