Re: [Opengc-devel] multiple data sources?
Status: Pre-Alpha
Brought to you by:
madmartigan
From: Damion S. <be...@cs...> - 2003-09-24 17:06:45
|
Hmmm... I guess I'm not entirely sure what you're trying to do, so let me know if this is any help: There can only be one data source in a render object; this is because it's impossible to override the m_pDataSource member on a per-object basis, because it's a static member variable - see the first bit of main.cpp, the statics are initialized as: ogcDataSource* ogcRenderObject::m_pDataSource = 0; It was designed this way to avoid having to explicitly set the render window, data source, and font manager in each subclass of RenderObject, since there are so many of them. Now, there is nothing to prevent you from adding specific network functionality to a particular gauge, it would just have to be done internally with a different data source name (e.g. m_TCASDataStream). You would also probably _not_ want to derive it from the DataSource base class, since it's assumed that all data sources are capable of providing roughly the same information, and yours provides very specific information. My suggestion would just be to add network socket functionality to your version of the nav gauge, that would execute each time a render call came through. That way, all of the network traffic occurs locally and is only visible to your code. Does this answer your question? Cheers, -Damion- > I am trying to add another data source, specifically to the > NavTestGauge, but it isn't working. --------- Damion Shelton Carnegie Mellon University, Robotics Institute A408-o Newell Simon Hall 412.268.3866 (office) 412.818.8829 (cell) 412.268.6436 (fax) http://www.cs.cmu.edu/~beowulf --------- I hope that after I die, people will say of me: "That guy sure owed me a lot of money." |