Article View: borland.public.jbuilder.java.swing
Article #8101Re: Blitting Efficiently In Java...
From: Benn Herrera
Date: Tue, 24 Oct 2000 00:00
Date: Tue, 24 Oct 2000 00:00
56 lines
2763 bytes
2763 bytes
I have seen other (pure) Java apps blit at 10 frames/second (actual image blitting, not just refresh of drawn graphics primitives) So it *can* do it if you tweak it right. I am using an image that was created from a memory image source. When I created the memory image source, I specified the same color space as the panel had (using getColorSpace()) - I thought that perhaps the problem was a translation step between occurring for each pixel. This did not help - how can I find out more about the execution path followed when a blit is done so as to find the bottleneck? Thanks! -Benn "John McGrath [TeamB]" wrote: > On Mon, 23 Oct 2000 11:33:02 -0700, Benn Herrera wrote: > > > I am working on a hybrid Java GUI/C++ back end application > > and have run into a major performance snag. The C++ shared > > library I am accessing through JNI does 3D rendering to an > > image buffer provided by from the Java side. The rendered > > buffer is then displayed in a JPanel via the method drawImage. > > > > The blitting is terribly slow. Using the same shared library > > with a native front end, I get interactive speeds of 5-8 frames > > per second. With the Java front end i'm getting 2-3 frames per > > second. > > Java's display mechanisms are fast enough for many applications, but it > may be that they are not capable of displaying at the frame rates you > need. > > One solution you might look at is the AWT Native Interface, which allows > you to render part of the Java UI in native code. I have not used it, > but it sounds like it may be what you need. For more information, see: > > http://java.sun.com/j2se/1.3/docs/guide/awt/enhancements.html#native > > -- > Regards, > > John McGrath [TeamB] > > --------------------------------------------------- > Before sending me e-mail, please read: > http://www.JPMcGrath.net/newsgroups/e-mail.html -- Benn Herrera - Senior Software Engineer / Computing Operations Resolution Sciences Corporation - http://www.resolve3d.com 527 Tamal Plaza, Corte Madera, CA 94925 T:415/945-7360xt27 F:415/945-7905 E:benn@resolve3d.com
Technical Details
Message-ID:
<39F5E63C.8363AC53@resolve3d.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39F4845E.6702B997@resolve3d.com> <MPG.145f07e646ef29a8989c76@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,bd9a64f743802bd9 X-Google-Attributes: gid111d45,public From: Benn Herrera <benn@resolve3d.com> Subject: Re: Blitting Efficiently In Java... Date: 2000/10/24 Message-ID: <39F5E63C.8363AC53@resolve3d.com> X-Deja-AN: 685365290 Content-Transfer-Encoding: 7bit References: <39F4845E.6702B997@resolve3d.com> <MPG.145f07e646ef29a8989c76@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 24 Oct 2000 12:32:33 -0800, 208.176.155.25 MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing