osggraph: fix acc loader when it finds bad traingles
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9468 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 103f70883cad6cd5ea8e1e3f090ea8b50a7fffe4 Former-commit-id: 41de3f3b7427b9b6ab6cbd62af6c422f338262d3
This commit is contained in:
parent
a8224fd5fe
commit
b3c35cf85b
2 changed files with 7 additions and 3 deletions
|
@ -871,7 +871,7 @@ public:
|
|||
if (_refs.size() == 3) // degenerate triangle so give up
|
||||
{
|
||||
osg::notify(osg::WARN) << "osgDB SPEED DREAMS reader: detected degenerate surface!" << std::endl;
|
||||
return false;
|
||||
// TODO delete degenerate triangle
|
||||
}
|
||||
else // remove duplicate vertex and normal
|
||||
{
|
||||
|
|
|
@ -3283,6 +3283,8 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b
|
|||
|
||||
x -= BR_WIDTH_0;
|
||||
|
||||
NEWDISPLIST(false, "S3Bg", 0);
|
||||
|
||||
SETPOINT(curTexElt, nbvert, 3, 1, x + BR_WIDTH_0, y, z + BR_HEIGHT_1);
|
||||
SETPOINT(curTexElt, nbvert, 3, 0, x, y, z + BR_HEIGHT_1);
|
||||
|
||||
|
@ -3293,7 +3295,7 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b
|
|||
|
||||
y += BR_WIDTH_1; /* back to origin */
|
||||
|
||||
NEWDISPLIST(false, "S3Bg", 0);
|
||||
NEWDISPLIST(false, "S4Bg", 0);
|
||||
|
||||
y2 += BR_WIDTH_1;
|
||||
|
||||
|
@ -3307,6 +3309,8 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b
|
|||
|
||||
x2 += BR_WIDTH_0;
|
||||
|
||||
NEWDISPLIST(false, "S5Bg", 0);
|
||||
|
||||
SETPOINT(curTexElt, nbvert, 1, 1, x2, y2, z + BR_HEIGHT_1);
|
||||
SETPOINT(curTexElt, nbvert, 1, 0, x2, y2, z + BR_HEIGHT_2);
|
||||
|
||||
|
@ -3326,7 +3330,7 @@ int InitScene(tTrack *Track, void *TrackHandle, bool bump, bool raceline, bool b
|
|||
SETPOINT(curTexElt, nbvert, 4, 0, x2, y2, z + BR_HEIGHT_2);
|
||||
|
||||
/* Middle on the bridge */
|
||||
CHECKDISPLIST2("pylon3", 4, "S4Bg", 2);
|
||||
CHECKDISPLIST2("pylon3", 4, "S6Bg", 2);
|
||||
|
||||
SETPOINT(curTexElt, nbvert, 0, 0, x2, y2, z + BR_HEIGHT_2);
|
||||
SETPOINT(curTexElt, nbvert, 1, 0, x, y, z + BR_HEIGHT_2);
|
||||
|
|
Loading…
Reference in a new issue