Thanks Javadesktop -- whomever you are... Good set of references.
Some questions: I wrote an applet to display panoramic images. To display them properly, there is a necessary projection to make images look right. I won't go into the details of the projection but that projection is not in the Java2D toolkit. My question relates to how I implemented my drawing and updating. I use MemoryImageSource and BufferStrategy to draw an integer pixel array that I operate on directly for projection and interpolation. I get pretty good performance. I can completely redraw a 640x360 image in less than 70 ms with no flicker on a real old slow machine -- Win2K; 800 mhz processor; Java 5; old GeForce video card. But as always -- faster is better. So how does the use of MemoryImageSource and BufferStrategy differ from using VolatileImage? I'm guessing that there is a VolitileImage hiding in the basement somewhere in my implementation. Or should I consider rewriting using VolitileImages??? "You shouldn't need to communicate with the SurfaceManager directly, since this is a sun private API." Lastly, all those nice runtime flags -- is there some way to set those flags from an applet or an application? Now that would be real useful. I think that we should not be protected from ourselves. Let us try these things out and let us deal with the consequences... Ken [EMAIL PROTECTED] wrote:
Managed images only become managed after a certain number of "render from" operations, such as a call to drawImage(). The threshold is adjustable using the Sun specific flag: <p> -Dsun.java2d.accthreshold=x where x is the number of render operations before that image will be cached in VRAM. Setting this to zero should force all images to become accelerated on load. Note that any time you render to the image, it will become accelerated until you start rendering from it again. Further if you try to grab the DataBuffer directly, the image is no longer a candidate for acceleration since it can't tell when you're making changes to the image. <p> You shouldn't need to communicate with the SurfaceManager directly, since this is a sun private API. If you don't want to play with runtime properties, the obvious workaround is to ensure that the image is drawn to a dummy surface a few times before being used by the app. <p> <a href="http://java.sun.com/j2se/1.5.0/docs/guide/2d/flags.html">This link</a> details the runtime flags and Chet's blog on BufferedImages gives tonnes of stuff about acceleration: <a href="http://weblogs.java.net/blog/chet/archive/2003/08/bufferedimage_a.html">Here</a> and <a href="http://weblogs.java.net/blog/chet/archive/2003/08/bufferedimage_a_1.html">here</a> [Message sent by forum member 'fred34' (fred34)] http://forums.java.net/jive/thread.jspa?messageID=218010 =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".