//
// Written by Harald JOHNSEN, started May 2005.
//
-// Copyright (C) 2005 Harald JOHNSEN - hjohnsen@evc.net
+// Copyright (C) 2005 Harald JOHNSEN
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
//
//
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <plib/sg.h>
#include <plib/ssg.h>
#include <Main/fg_props.hxx>
_Instrument = fgGetNode(branch.c_str(), num, true );
_serviceable_node = _Instrument->getChild("serviceable", 0, true);
resultTexture = FGTextureManager::createTexture( odgauge_name );
- resultTexture->ref();
SGPath tpath(globals->get_fg_root());
tpath.append("Aircraft/Instruments/Textures/wxecho.rgb");
// no mipmap or else alpha will mix with pixels on the border of shapes, ruining the effect
wxEcho = new ssgTexture( tpath.c_str(), false, false, false);
- wxEcho->ref();
_Instrument->setFloatValue("trk", 0.0);
_Instrument->setFloatValue("tilt", 0.0);
odg->set_texture( odgauge_name, resultTexture->getHandle());
last_switchKnob = switchKnob;
}
+ FGViewer *current__view = globals->get_current_view();
+ if( current__view->getInternal() &&
+ (current__view->getHeadingOffset_deg() <= 15.0 || current__view->getHeadingOffset_deg() >= 345.0) &&
+ (current__view->getPitchOffset_deg() <= 15.0 || current__view->getPitchOffset_deg() >= 350.0) ) {
+
+ // we don't update the radar echo if the pilot looks around
+ // this is a copy
+ radarEchoBuffer = *sgEnviro.get_radar_echo();
+ }
odg->beginCapture(256);
odg->Clear();
+
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glPushMatrix();
const float rot_x = cos ( view_heading );
const float rot_y = sin ( view_heading );
- list_of_SGWxRadarEcho *radarEcho = sgEnviro.get_radar_echo();
+ list_of_SGWxRadarEcho *radarEcho = &radarEchoBuffer;
list_of_SGWxRadarEcho::iterator iradarEcho;
const float LWClevel[] = { 0.1f, 0.5f, 2.1f };
const float symbolSize = 1.0f / 8.0f ;