OpenGL rendering to an SWT Image [message #532291] |
Fri, 07 May 2010 15:25  |
Eclipse User |
|
|
|
I'm attempting to render an OpenGL scene running in an Eclipse RCP project view to an SWT image, and am not finding a lot of resources regarding this.
I'm able to do this in a regular (non-Eclipse) Java application using the (albeit non-standard) class com.sun.opengl.util.Screenshot, by redrawing the canvas, making the OpenGL context current, and capturing the contents using Screenshot.readToBufferedImage(width, height).
Now, I realize that i can continue to do the above, and simply convert between the Java AWT BufferedImage and the SWT Image classes, but this is kind of resource intensive, and I feel rather unnecessary.
Anyone have any suggestions?
Thanks in advance!
R
|
|
|
Re: OpenGL rendering to an SWT Image [message #535771 is a reply to message #532291] |
Tue, 25 May 2010 10:42  |
Eclipse User |
|
|
|
Hi, sorry for the late response,
I've posted a snippet that demonstrates this, see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet341.java?view=co .
Grant
"Anonymous Coward" <rkausch@gmail.com> wrote in message
news:hs1pes$d7f$1@build.eclipse.org...
> I'm attempting to render an OpenGL scene running in an Eclipse RCP project
view to an SWT image, and am not finding a lot of resources regarding this.
>
> I'm able to do this in a regular (non-Eclipse) Java application using the
(albeit non-standard) class com.sun.opengl.util.Screenshot, by redrawing the
canvas, making the OpenGL context current, and capturing the contents using
Screenshot.readToBufferedImage(width, height).
>
> Now, I realize that i can continue to do the above, and simply convert
between the Java AWT BufferedImage and the SWT Image classes, but this is
kind of resource intensive, and I feel rather unnecessary.
>
> Anyone have any suggestions?
>
> Thanks in advance!
> R
|
|
|
Powered by
FUDForum. Page generated in 0.03187 seconds