I am trying to get various screen properties (window PhysicalWidth, etc.) from my Canvas3D and am having timing problems. The objective is to set ScreenScale (I'm using parallel projection) correctly for a full window presentation of my geometry.
I instantiate the Canvas3D, connect it to a SimpleUniverse, create a SceneGraph and make it live. I then query the canvas (via getPhysicalWidth(), etc) for the properties. Get all zeros. Assuming a timing issue, I have launched a thread and used InvokeLater(). Still zeros.
If I wait to read the properties until I explicitly mouse click in the (now visible) canvas, the values are fine.
Any recommendations on how to synchronize my application thread to get the values?
Thanks,
Jack
