On Sat, 2009-08-08 at 22:39 -0600, Ron Jensen wrote: > I noticed long ago that only 1/2 of dirt and grass runways were > "textured". The untextured part was an appropriate color so I didn't > worry too much about it. > > Yesterday papillon81 brought the issue up on IRC because he'd like to > improve the texture. Looking at the code and using simgear's > decode_binobj to dump an airport I found that: > > Dirt and grass runways are generated by GenAirports/rwy_simple.cxx. > The runways are divided into two halves, "A" and "B" each consisting > of > two triangles. > Runway half "A" is good. > Runway half "B"'s first triangle UV coordinates are a very short line, > and its second triangle's UV coordinates are a point. > > This patch fixes the issue, but I suspect the original intent was to > mirror the texture around the center-line to hide any seams and this > patch doesn't do that... > > > Thanks, > > Ron
O.K., this patch does the Right Thing. It simply changes the reference point so the UV coords for the B runway are positive. They were coming out negative and getting clipped in build.cxx. Thanks, Ron. diff --git a/src/Airports/GenAirports/rwy_simple.cxx b/src/Airports/GenAirports/rwy_simple.cxx index 99eb321..8f91334 100644 --- a/src/Airports/GenAirports/rwy_simple.cxx +++ b/src/Airports/GenAirports/rwy_simple.cxx @@ -98,7 +98,7 @@ void gen_simple_rwy( const TGRunway& rwy_info, rwy_polys->push_back( sp ); SG_LOG(SG_GENERAL, SG_DEBUG, "clipped_b = " << clipped_b.contours()); *accum = tgPolygonUnion( runway_b, *accum ); - tp = TGTexParams( runway_b.get_pt(0,0), + tp = TGTexParams( runway_b.get_pt(0,2), rwy_info.width * SG_FEET_TO_METER, rwy_info.length * SG_FEET_TO_METER / 2.0, rwy_info.heading + 180.0 ); ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel