Hello.
I’m going to release a component based on JOGL that renders a “CoverFlow” View for the NetBeans RCP platform (screenshot below). I started from the “Twinkle” demo by Romain Guy, Chris Campbell and others and refactored it heavily for making the animation pluggable, managing asynchronous loading of images (needed in the real world) and integrating with the NetBeans RCP APIs.
There are some issues left, that I think are mostly related to my deep ignorance of JOGL (without starting from Twinkle code I would never be able to deal with the JOGL stuff by myself). In details:
-
the animation is reasonably smooth when the component is run with the size shown in the screenshot, but if I maximize it, things get not so smooth as I would expect (on a MacBook Pro). At the moment, the bitmaps used as texture are 400x400 but I plan to reuse part of the code for other things that would deal with full-screen images (e.g. 1500x1500). Part of the problem is that I don’t know which performance I should expect from the thing, but looking at NASA World Wind for Java or some games, I think it should be better. Is there any benchmark I can use as a reference? Could it be due to the use of GLJPanel instead of GLCanvas? At the moment I’m reinstalling my Linux and Windows box, so I didn’t run any test with Java 6 yet.
-
one specific problem with the animation smoothness is when a new image is loaded and converted in a Texture. In this case the problem is severe since the operation takes around 200ms (around 100ms during the preparation of the texture and 100 extra ms I see with the next paintComponent(). To address this issue I’m evaluating some different way of caching, for instance trying to keep as long as possible the Textures (instead of purging them whenever an object exits from the scene), but in this case I need to know how I can get the amount of free video card memory (where I suppose textures are stored) in order to implement a LRU cache or such. Also, I suppose the glTexSubImage2D() operation can’t be performed in a separate thread, right?
Thanks in advance.