Here is our first cut at an overlay library. This isn't the final
distribution form, just the source which you can compile and test. There
are a few packages:
com.xith.java3d.testbed : simple platform for testing code.
com.xith.java3d.overlay: Support code and test code for overlays
com.xith.client.gui: Chatbox implementation.
com.navtools.util: High resolution windows timer.
There is also a DLL which adds the native support for this high resolution
timer :TIMIMPL.DLL. This should go on the path if you want to run the chat
box test. The overlay library itself does not use it.
To run the basic test, compile everything and make sure the classes go into
your classpath destination. Make sure TIMIMPL.DLL is in your path. Run
com.xith.java3d.overlay.OverlayTester. This will start a scene with an FPS
counter, a test overlay and the chatbox.
The test program shoves lines and keystrokes into the chatbox so you can see
how fast and smooth it runs.
I don't have license information at the top of all the source yet. I will
be releasing the final version with a license that basically states "use it
for whatever you want, even commercial, but send fixes and improvements back
to me so I can publish the fixes".
So what I am looking for is some performance feedback on your hardware. Let
me know how it runs on your hardware. Secondarily take a look at the code to
see if you think the interface should be expanded to add more features.
FpsOverlay is a simple example of how to use it, and the ChatOverlay is a
much, much more complex example. I have removed the high res timer throttle
from the Overlay and ScrollingOverlay, so you will have to be smart about
how often you call repaint() on them. The ChatOverlay only allows updates
every 100 ms to make sure we don't kill the card. The ChatOverlay also
makes sure only one major change is made to the overlay once a frame, so it
is a good example of how to use the overlay's correctly. You could
implement the ScrollingOverlay very badly and cause every line to be rebuilt
every frame and you would lose its true power.
Dave Yazel
www.cosm-game.com
overlay.zip