SWT GLCanvas + Curve TextRenderer

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

SWT GLCanvas + Curve TextRenderer

visor.ck
Hi, I'm going to use jogl for drawing charts in my RCP-based applicaon.

But I'm stuck trying to make  com.jogamp.graph.curve.opengl.TextRenderer to work with org.eclipse.swt.opengl.GLCanvas

Can anyone provide a simple example of drawing some text on org.eclipse.swt.opengl.GLCanvas using com.jogamp.graph.curve.opengl.TextRenderer ?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: SWT GLCanvas + Curve TextRenderer

Sven Gothel
Administrator
On 11/26/2012 04:48 PM, visor.ck [via jogamp] wrote:
> Hi, I'm going to use jogl for drawing charts in my RCP-based applicaon.
>
> But I'm stuck trying to make  com.jogamp.graph.curve.opengl.TextRenderer to
> work with org.eclipse.swt.opengl.GLCanvas

Pls use NewtCanvasSWT, since the Eclipse SWT GLCanvas is not properly supported.
Also our SWT GLCanvas cannot suit GLCapabilties properly, read API doc.

Then .. it is easy to attach a NEWT window to SWT via NewtCanvasSWT,
i.e. use one of the unit-test/demos using graph.

>
> Can anyone provide a simple example of drawing some text on
> org.eclipse.swt.opengl.GLCanvas using
> com.jogamp.graph.curve.opengl.TextRenderer ?
>
> Thank you.

~Sven



signature.asc (909 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: SWT GLCanvas + Curve TextRenderer

visor.ck
Where can i find such demos or unit-tests ?
Reply | Threaded
Open this post in threaded view
|

Re: SWT GLCanvas + Curve TextRenderer

gouessej
Administrator
The demos are here and our JUnit tests with SWT are here.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: SWT GLCanvas + Curve TextRenderer

visor.ck
I'm getting some strange "java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Canvas" when i try to add NewtCanvasSWT to my view.
It is strange because i definetly have org.eclipse.swt.widgets.Canvas in my project's classpath.

Creating org.eclipse.swt.widgets.Canvas works fine
        Canvas can = new Canvas(parent, SWT.NONE);

but
        NewtCanvasSWT newtCanvas = NewtCanvasSWT.create(parent, style, null);
causes ClassNotFoundException
               
I used this guide for setting up Eclipse enviorenment
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Eclipse_IDE_user_library