[OpenJDK 2D-Dev] Hardware-Accelerated Rendering Using OpenGL
neugens.limasoftware@gmail.com
neugens.limasoftware at gmail.com
Tue Jul 19 07:46:40 UTC 2011
I agree with Roman, although there are still some issues to solve.
Last time I used the OGL pipeline I got an amazing result of a gray rectangle on screen in place of the swing content, and it seems quite common problem.
I also doubt that the challenges that a 2d drawing api poses can be solved efficiently with OGL; when working on a similar project, we used to render on a texture all the content using the software pipelines, and only render the (sub)texture when needed, which looks similar to what you do, and performance were very good for Swing rendering.
I would still give a try at using the OGLSurface directly, though, perhaps this will help track down the current issues and fix what is needed.
Mario
--
Sent from HTC Desire...
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF
http://www.icedrobot.org
Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/
Please, support open standards:
http://endsoftpatents.org/
----- Reply message -----
Da: "Herve Girod" <herve.girod at gmail.com>
Data: mar, lug 19, 2011 02:43
Oggetto: [OpenJDK 2D-Dev] Hardware-Accelerated Rendering Using OpenGL
A: <2d-dev at openjdk.java.net>
Hello,
I hope it is the correct list for this kind of problem. If not, don't bother
to read the rest of the message ;)
I am using OpenGL acceleration in a "soft real-time" Java program by using
JOGL, drawing in an external OpenGL context (coming from a master C app
which set it's OpenGL context and then calls the Java app by JNI). The Java
application is based on Swing rendering, but I redirect the rendering on a
Graphics2D context to draw in this external context.
I am able to have a not so bad performance by drawing the low-level Swing
content on a texture which in turn is put on the external OpenGL context.
However, the performance and the quality of the resulting image could be
much better if the Java app really processed the low level OpenGL orders
rather than drawing a huge texture. I know how to code an OpenGL
"Graphics2D" renderer, but it's a lot of work and a lot of possibilities to
create bugs, and I'm thinking that Java2D has already internally an
OpenGL-based pipeline. Would it be possible for me to leverage this pipeline
instead of recreating a new (less good) one?
Again sorry if it's not the right list.
Herve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20110719/e706a7a0/attachment.html>
More information about the 2d-dev
mailing list