Hi everyone, I would like to know if there is a way to combine BufferStrategy and JavaFX Effect classes to draw the hardware accelerated effects prodived by JavaFX directly to the BufferStrategy backbuffer.
For effects that do not require the destination surface content, I believe there is no particular issue as I can use the render method of the effect with the BufferStrategy Graphic2D as argument. However, what about other effects ? The ones that make use of the destination surface ? Is there a way to avoid using an intermediate image that would then be drawn on the BufferStrategy backbuffer ? The reason I am asking this is that I was desperately waiting for what was supposed to be called the PhotoComposite API that would allow new blending modes (ADD, MULTIPLY, OVERLAY, ...) to be used as Composite for the Graphics2D API. Unfortunately, it seems that the original plan is no longer in scope as stated in the RFE 6541868 (RFE: hardware acceleration for advanced blending modes (aka PhotoComposite) ): "Therefore, my current inclination is to scale back the changes originally proposed for JDK 7 and instead make small additions to the existing AlphaComposite API with at least an ADD mode since a) that is the most commonly requested blend mode that isn't already provided in AlphaComposite, b) it fits in fairly well with the existing AlphaComposite rules, and c) it can be accelerated easily in both the software and hardware pipelines (without the use of shaders or reading back from the framebuffer in the hardware case). We might also be able to add a simple MULTIPLY mode, but that will require some more investigation. I think this approach (small enhancements to AlphaComposite) would serve the needs of Java2D developers quite well, while keeping the implementation burden low. Developers who want access to extended blend modes can use the Blend class from JavaFX, which offers the right amount of functionality in a form that can be easily accelerated on the GPU." Having ADD and MULTIPLY as Composite for Graphics2D is much better than nothing as they are usually the most useful "advanced" blending modes. My problem is that I am working with the BufferStrategy to perform fast frame rate in fullscreen mode. And when using the BufferStrategy, I cannot access to the actual offscreen backbuffer to use it with the JavaFX Blend implementation that will give access to the other hardware accelerated blending modes. As stated by Dmitri said in a previous thread, using a VI and then drawing it with the BufferStrategy is not really satifying... This is why having the Graphics2D API able to use all the wonderful hardware accelerated drawing features of the JavaFX package would be very nice... If you see some kind of workaround for me to use JavaFX API with the BufferStrategy without using an additional backbuffer, I would be very interested ! Thanks. Vincent. [Message sent by forum member 'vync79' (vync79)] http://forums.java.net/jive/thread.jspa?messageID=341319 =========================================================================== To unsubscribe, send email to lists...@java.sun.com and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to lists...@java.sun.com and include in the body of the message "help".