Re: [Flightgear-devel] Object scope help

2011-10-11 Thread Michael Robson

Thorsten,

Thanks for your prompt reply.

I get that the pointer is NULL, but I do not understand why!

I believe that I have called the correct method to return a pointer to the 
object.  And since I know that the object has been instantiated (since i get a 
cout message to tell me and also i can see the object doing what its supposed 
to be doing on screen).

Do you have any idea why this object may be null? have i correctly registered 
the instrument? does the instrument not persist until program completion? How 
do I correctly obtain a pointer to this object if this is not the correct way?

Thanks

Robbo

> Date: Tue, 11 Oct 2011 23:42:42 +0200
> From: bre...@gmail.com
> To: flightgear-devel@lists.sourceforge.net
> Subject: Re: [Flightgear-devel] Object scope help
> 
> On 11.10.2011 23:31, Robbo wrote:
> > TaRadar* _taradar_node = (TaRadar*) globals->get_subsystem("
> > taradar");
> >
> > Now then, if TaRadar::getAngle() has the following fixed code:
> > return 10;
> > everything works ok, but if the method returns an object variable:
> > return _angle;
> > I get a segmentation fault.
> 
> That means "_taradar_node" is NULL. Calling _taradar_node->getAngle() is 
> illegal if _taradar_node=0. However, if the method you're calling 
> doesn't access the object itself, but just returns a constant ("return 
> 10"), then nothing happens (lucky!). Add a check "if (_taradar_node!=0) 
> ..." and see why the pointer is NULL.
> 
> cheers,
> Thorsten
> 
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
  --
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Query about groundradar Instrument module

2011-09-30 Thread Michael Robson

Hi,

Thanks for your replies with regards to this subject.

It is all starting to make some sense now.  If I understand correctly then, the 
C++ module generates an in-memory texture that the xml files reference for 
displaying within the OSG tree.  This texture is being continually re-generated 
to provide a 'dynamic texture'!

Can I assume that this this is the standard way to generate dynamic graphical 
information on screen?

Essentially what I am looking to do is create some instruments of my own with 
some detailed generation of graphical entities that are being continually 
updated.  I am therefore assuming that a 'dynamic texture' is the way to go 
with this.  If there is another way, perhaps better, then I am open to 
suggestions!

Regards,

Robbo
  --
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel