David Megginson writes:
>
>David Megginson writes:
>
> >  > 2. I used callbacks to prevent empty object branches from being
> >  > culled.  Perhaps a placeholder with a dummy bounding 
>sphere would be
> >  > better, since we'd still get FOV culling, but this will need more
> >  > work.
> > 
> > I'll look more closely at this one.
>
>Yes, that was it.  I made the changes, and now here are my results for
>sitting still at the default location in daylight:
>
>  With dynamic objects: 41fps
>  Without dynamic objects: 41-42fps

This is MUCH better :-)

FWIW - This should help the 'stutter' while loading a 'bit'

void
makeWorldUpRotationMatrix (sgMat4 ROT, double hdg_deg,
                           double lon_deg, double lat_deg)
{
        SGfloat sin_lat = sin( lat_deg * SGD_DEGREES_TO_RADIANS );
        SGfloat cos_lat = cos( lat_deg * SGD_DEGREES_TO_RADIANS );
        SGfloat sin_lon = sin( lon_deg * SGD_DEGREES_TO_RADIANS );
        SGfloat cos_lon = cos( lon_deg * SGD_DEGREES_TO_RADIANS );
        SGfloat sin_hdg = sin( hdg_deg * SGD_DEGREES_TO_RADIANS ) ;
        SGfloat cos_hdg = cos( hdg_deg * SGD_DEGREES_TO_RADIANS ) ;

        ROT[0][0] =  cos_hdg * sin_lat * cos_lon - sin_hdg * sin_lon;
        ROT[0][1] =  cos_hdg * sin_lat * sin_lon + sin_hdg * cos_lon;
        ROT[0][2] = -cos_hdg * cos_lat;
        ROT[0][3] =  SG_ZERO;

        ROT[1][0] = -sin_hdg * sin_lat * cos_lon - cos_hdg * sin_lon;
        ROT[1][1] = -sin_hdg * sin_lat * sin_lon + cos_hdg * cos_lon;
        ROT[1][2] =  sin_hdg * cos_lat;
        ROT[1][3] =  SG_ZERO;

        ROT[2][0] = cos_lat * cos_lon;
        ROT[2][1] = cos_lat * sin_lon;
        ROT[2][2] = sin_lat;
        ROT[2][3] = SG_ZERO;

        ROT[3][0] = SG_ZERO;
        ROT[3][1] = SG_ZERO;
        ROT[3][2] = SG_ZERO;
        ROT[3][3] = SG_ONE ;
}



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to