World Wind Forums

Go Back   World Wind Forums > WorldWind .Net Development > Developers' Corner

Developers' Corner General World Wind development.

Reply
 
Thread Tools Display Modes
Old 02-04-2010, 09:50 AM   #1
DaNy
Junior Member
 
Join Date: Feb 2010
Posts: 5
Question Map refresh rate with several views

Hello everyone.

I am developping a plugin for WW which display flights paths on the main view and that have 2 other views (top and side) in separated windows (widget floating windows).

It works fine except that the main view is refreshing again and again while these two views are displayed. When i close the views, everything is ok.

Here are the screens :


The zones around the plane's icon are being refreshed again and again


Here, everything is ok.


Here is the code i use to display each view :

Quote:
private void RenderCurrentView(DrawArgs drawArgs)
{
WorldWind.Camera.CameraBase camera1 = new WorldWind.Camera.CameraBase(Vector3.Empt y, drawArgs.CurrentWorld.EquatorialRadius);

Device device = drawArgs.device;

// Save default viewport/camera
Viewport origVp = device.Viewport;
WorldWind.Camera.CameraBase defaultCamera = drawArgs.WorldCamera;

// Set first point of view:
camera1.CurrentOrientation = defaultCamera.CurrentOrientation;

camera1.SetPosition(defaultCamera.Latitu de.Degrees,
defaultCamera.Longitude.Degrees,
m_HeadingCamera,
m_AltitudeCamera,
m_TiltCamera,
defaultCamera.Bank.Degrees);
camera1.Distance = m_DistanceCamera;
camera1.Update(device);

// set viewport
device.Viewport = viewport;
drawArgs.WorldCamera = camera1;

// Render objects
foreach (WorldWind.Renderable.RenderableObject child in drawArgs.CurrentWorld.RenderableObjects. ChildObjects)
{
if (child.IsOn)
{
//if (child.Name == "Sky Gradient") continue;
child.Render(drawArgs);
}
}

// Restore default view port and camera
drawArgs.WorldCamera = defaultCamera;
device.Viewport = origVp;
}
Any idea ?
DaNy is offline   Reply With Quote
Old 02-04-2010, 01:29 PM   #2
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,446
Default

Are you using the latest code out of SVN? They've done some work on cleaning up the renderable objects list. I know that the changes caused problems for me, and I had to roll back to the code that was used in V1.4, I think. If you are using the V1.4 released version, maybe consider trying the latest code. I'm pretty sure it will perform differently, but maybe not fix your problem. I'm not sure where you can get a release mode build of the latest code though.
James
James_In_Utah is offline   Reply With Quote
Old 02-04-2010, 01:45 PM   #3
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,446
Default

By the way, what's the format of the input data? CSV file? Is the plugin something that you could share? I would love to try it out.
Thanks,
James
James_In_Utah is offline   Reply With Quote
Old 02-04-2010, 02:58 PM   #4
DaNy
Junior Member
 
Join Date: Feb 2010
Posts: 5
Default

Ooooh i am working with the 1.4 version downloaded from the website. Maybe i really should consider getting the SVN version.

I'll try and maybe these problems will disapear ;o)

As for the input format, the data are taken from LOM files (raw data taken directly from airplanes, as recorded by the onboard systems). In fact, i am working for a French Aircraft company. And.....i dont know if i will be able to share the plugin.

I'll let you know too !!!

Thanks for your help, anyway.

I'll try getting the very new version from SVN.
DaNy is offline   Reply With Quote
Old 02-04-2010, 04:40 PM   #5
Unregistered
Guest
 
Posts: n/a
Default and laptops

Aie......i got the latest version from SVN and......it's worse
I have the same refresh problem in my main view but now, the tiles do not refresh im my separate views.
  Reply With Quote
Old 02-04-2010, 04:42 PM   #6
DaNy
Junior Member
 
Join Date: Feb 2010
Posts: 5
Default

Aie....i tried with the latest SVN version but it is worse...

I have the same problems with my main view that refreshes a lot but now, the maps does not seam to refresh in my top and side views...
DaNy is offline   Reply With Quote
Old 02-04-2010, 06:52 PM   #7
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,446
Default

Well, the only pluggin I can find on my box that uses the widget floating windows is the Whiteboard plugin. It doesn't really do anything, but it does open a floating window on the screen. I can move it around and resize it, and I haven't noticed any display problems. There are a couple of settings you can play around with to see if it makes a differents. Hit Alt-W, to get the settings window, then try changing the AlwaysRenderWindow (you might have to scroll up to see it) to false. Also under the UI section try changing the ThrottleFPS. I have mine set to 50. I also have FPSFrameCount set to 300. Not sure what that does. You may find there is something else here that helps.
James
James_In_Utah is offline   Reply With Quote
Old 02-05-2010, 10:48 AM   #8
Unregistered
Guest
 
Posts: n/a
Smile

Thank you for your Help James.

I eventually found the solution. I had to force the RenderPriority when rendering my Views.

Quote:
foreach (WorldWind.Renderable.RenderableObject child in drawArgs.CurrentWorld.RenderableObjects. ChildObjects)
{
if (child.Name == "Images")
{
child.RenderPriority = WorldWind.Renderable.RenderPriority.Terr ainMappedImages;
}
child.Render(drawArgs);
}
Thank you !!!
  Reply With Quote
Old 02-05-2010, 10:52 AM   #9
DaNy
Junior Member
 
Join Date: Feb 2010
Posts: 5
Default

OK, thanks for your help !!!

I eventually found the solution : i have to force the RenderPriority when dislaying my views.

Quote:
foreach (WorldWind.Renderable.RenderableObject child in drawArgs.CurrentWorld.RenderableObjects. ChildObjects)
{
if (child.Name == "Images")
{
child.RenderPriority = WorldWind.Renderable.RenderPriority.Terr ainMappedImages;
}
child.Render(drawArgs);
}
DaNy is offline   Reply With Quote
Old 02-05-2010, 04:26 PM   #10
DaNy
Junior Member
 
Join Date: Feb 2010
Posts: 5
Default

Ok, now my views are refreshed. but my main window has the problem too.

I guess the problem can come from that : the world's main view refreshes. It refreshes the Widget Views that point on the main view world. That refreshes its Widget views and so on.

I'm on a loop and everything flashes around me !!!

Anybody has an idea how to avoid the refresh "loop" ??
DaNy is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting to server fleak Technical Support 4 08-11-2009 09:37 PM
Just released: Maplecroft Global Maps Series rafiki7 Add-ons & Scripts 10 06-07-2007 09:28 AM
Forest Fire Map: Europe WilloxH Community Chat 8 05-29-2007 07:07 PM
Just updated: 25 New Maplecroft Global Maps Add-ons rafiki7 Add-ons & Scripts 0 03-14-2007 10:18 AM
refresh rate of images in ww? Unregistered Add-on & Script Development 1 08-25-2006 04:37 PM


All times are GMT +1. The time now is 11:38 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.