From: Kenneth B. R. <kbr...@al...> - 2001-10-01 07:25:52
|
> OK, now I change the state in the mouse and keyboard callbacks, but the > problem is when I load a texture in display method, it cost time, well I > load the textures, and I catch them, but in my aplication I fly over > terrain, and I have to load textures while I am moving. > > How can I make a correct context, are there any example? You might want to look at the Grand Canyon demo at http://java.sun.com/products/jfc/tsc/articles/jcanyon/ This demo loads textures in a background thread and hands them off to the main thread. It uses JDK 1.4-specific APIs (and needs to be updated once GL4Java 2.8.0 is out) but the structure is reusable; see terrain.AsyncFetcher. |