Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ViewPart-createPartControl(Composite c)
ViewPart-createPartControl(Composite c) [message #436584] Wed, 19 May 2004 21:13 Go to next message
selim is currently offline selimFriend
Messages: 31
Registered: July 2009
Member
I am trying to develop a 3D-viewer as an Eclipse plugin.
Application has a View object extending ViewPart and a canvas is created
in abstract ViewPart-createPartControl(Composite c) method.
The plug-in shows up with an error message in displaying area.
I tried to debug it couple of times but honestly I got lost in it. What I
understand is, whenever an instance of GLContext(It is instantiated in
canvas) is created in the application, It suspends with an error message
like "An error has occurred when creating this view" written on the canvas
in red. Any explanation why I am getting this message?
Thanks in advance..
Calling GL in ViewPart-createPartControl(Composite c) [message #436585 is a reply to message #436584] Wed, 19 May 2004 22:12 Go to previous messageGo to next message
selim is currently offline selimFriend
Messages: 31
Registered: July 2009
Member
Selim Yucel wrote:

> I am trying to develop a 3D-viewer as an Eclipse plugin.
> Application has a View object extending ViewPart and a canvas is created
> in abstract ViewPart-createPartControl(Composite c) method.
> The plug-in shows up with an error message in displaying area.
> I tried to debug it couple of times but honestly I got lost in it. What I
> understand is, whenever an instance of GLContext(It is instantiated in
> canvas) is created in the application, It suspends with an error message
> like "An error has occurred when creating this view" written on the canvas
> in red. Any explanation why I am getting this message?
> Thanks in advance..

Not only GLContext, but any opengl call in (ViewPart
abstract)-createPartControl(Composite c) results in the same way.
Any idea why?
Thanks.
Is this doable? [message #436631 is a reply to message #436585] Thu, 20 May 2004 19:20 Go to previous messageGo to next message
selim is currently offline selimFriend
Messages: 31
Registered: July 2009
Member
Selim Yucel wrote:

> Selim Yucel wrote:

> > I am trying to develop a 3D-viewer as an Eclipse plugin.
> > Application has a View object extending ViewPart and a canvas is created
> > in abstract ViewPart-createPartControl(Composite c) method.
> > The plug-in shows up with an error message in displaying area.
> > I tried to debug it couple of times but honestly I got lost in it. What I
> > understand is, whenever an instance of GLContext(It is instantiated in
> > canvas) is created in the application, It suspends with an error message
> > like "An error has occurred when creating this view" written on the canvas
> > in red. Any explanation why I am getting this message?
> > Thanks in advance..

> Not only GLContext, but any opengl call in (ViewPart
> abstract)-createPartControl(Composite c) results in the same way.
> Any idea why?
> Thanks.

I think I can narrow my question down to how to create an instance of
GLContext in view objects's createPartControl(Composite c) method.
Is this doable?
The project is a 3D viewer and working fine either in swt opengl or jogl..
The plan is to modify existing project in to an eclipse-plug-in.
Is this plan applicable with existing PDE capabilities?

I will deeply appreciate a recommendation.
Thanks.
PDE can not detect opengl classes. [message #436648 is a reply to message #436631] Fri, 21 May 2004 14:24 Go to previous messageGo to next message
selim is currently offline selimFriend
Messages: 31
Registered: July 2009
Member
Selim Yucel wrote:

> Selim Yucel wrote:

> > Selim Yucel wrote:

> > > I am trying to develop a 3D-viewer as an Eclipse plugin.
> > > Application has a View object extending ViewPart and a canvas is created
> > > in abstract ViewPart-createPartControl(Composite c) method.
> > > The plug-in shows up with an error message in displaying area.
> > > I tried to debug it couple of times but honestly I got lost in it. What I
> > > understand is, whenever an instance of GLContext(It is instantiated in
> > > canvas) is created in the application, It suspends with an error message
> > > like "An error has occurred when creating this view" written on the
canvas
> > > in red. Any explanation why I am getting this message?
> > > Thanks in advance..

> > Not only GLContext, but any opengl call in (ViewPart
> > abstract)-createPartControl(Composite c) results in the same way.
> > Any idea why?
> > Thanks.

> I think I can narrow my question down to how to create an instance of
> GLContext in view objects's createPartControl(Composite c) method.
> Is this doable?
> The project is a 3D viewer and working fine either in swt opengl or jogl..
> The plan is to modify existing project in to an eclipse-plug-in.
> Is this plan applicable with existing PDE capabilities?

> I will deeply appreciate a recommendation.
> Thanks.

Class launcher can not launch classes from opengl plugin although it was
included in dependencies and every where. In short PDE can not detect
opengl classes.
I included all God t... opengl source files in the project and It WORKS !!.
Re: Is this doable? [message #436649 is a reply to message #436631] Fri, 21 May 2004 14:32 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Following is an example of a view class with a GLContext:

import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.opengl.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.part.*;

public class SampleView extends ViewPart {
private Canvas glCanvas;
private GLContext context;
private float rotY = 0.0f;
private float yPos = 0.0f, xPos = 0.0f, zPos = -15.0f;
private int cubeListIndexBase;

public void createPartControl(Composite parent) {
glCanvas = new Canvas(parent, SWT.BORDER);
glCanvas.setBounds(0,0,400,400);
context = new GLContext(glCanvas);
context.setCurrent();
Rectangle rect = glCanvas.getClientArea();
int width = rect.width;
int height = rect.height;
height = Math.max(height, 1);
GL.glViewport(0, 0, width, height);
GL.glMatrixMode(GL.GL_PROJECTION);
GL.glLoadIdentity();
float fAspect = (float) width / (float) height;
GLU.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
GL.glMatrixMode(GL.GL_MODELVIEW);
GL.glLoadIdentity();
init();
}

public void setFocus() {
}

// OpenGL-specific methods...

void createCube() {
GL.glNewList(cubeListIndexBase, GL.GL_COMPILE);
GL.glBegin(GL.GL_QUADS);
// front
GL.glColor3f(0.0f, 1.0f, 0.0f);
GL.glVertex3f(-0.5f, -0.5f, 0.5f); // bottom left
GL.glColor3f(0.0f, 0.0f, 1.0f);
GL.glVertex3f(0.5f, -0.5f, 0.5f); // bottom right
GL.glColor3f(1.0f, 1.0f, 0.0f);
GL.glVertex3f(0.5f, 0.5f, 0.5f); // top right
GL.glColor3f(1.0f, 0.0f, 0.0f);
GL.glVertex3f(-0.5f, 0.5f, 0.5f); // top left
// back
GL.glColor3f(0.0f, 0.0f, 1.0f);
GL.glVertex3f(-0.5f, -0.5f, -0.5f); // bottom left
GL.glColor3f(0.0f, 1.0f, 0.0f);
GL.glVertex3f(0.5f, -0.5f, -0.5f); // bottom right
GL.glColor3f(1.0f, 0.0f, 0.0f);
GL.glVertex3f(0.5f, 0.5f, -0.5f); // top right
GL.glColor3f(1.0f, 1.0f, 0.0f);
GL.glVertex3f(-0.5f, 0.5f, -0.5f); // top left
// left
GL.glColor3f(0.0f, 0.0f, 1.0f);
GL.glVertex3f(-0.5f, -0.5f, -0.5f); // bottom left
GL.glColor3f(0.0f, 1.0f, 0.0f);
GL.glVertex3f(-0.5f, -0.5f, 0.5f); // bottom right
GL.glColor3f(1.0f, 0.0f, 0.0f);
GL.glVertex3f(-0.5f, 0.5f, 0.5f); // top right
GL.glColor3f(1.0f, 1.0f, 0.0f);
GL.glVertex3f(-0.5f, 0.5f, -0.5f); // top left
// right
GL.glColor3f(0.0f, 0.0f, 1.0f);
GL.glVertex3f(0.5f, -0.5f, 0.5f); // bottom left
GL.glColor3f(0.0f, 1.0f, 0.0f);
GL.glVertex3f(0.5f, -0.5f, -0.5f); // bottom right
GL.glColor3f(1.0f, 0.0f, 0.0f);
GL.glVertex3f(0.5f, 0.5f, -0.5f); // top right
GL.glColor3f(1.0f, 1.0f, 0.0f);
GL.glVertex3f(0.5f, 0.5f, 0.5f); // top left
// top
GL.glColor3f(1.0f, 0.0f, 0.0f);
GL.glVertex3f(0.5f, 0.5f, -0.5f);
GL.glColor3f(1.0f, 1.0f, 0.0f);
GL.glVertex3f(-0.5f, 0.5f, -0.5f);
GL.glColor3f(1.0f, 0.0f, 0.0f);
GL.glVertex3f(-0.5f, 0.5f, 0.5f);
GL.glColor3f(1.0f, 1.0f, 0.0f);
GL.glVertex3f(0.5f, 0.5f, 0.5f);
// bottom
GL.glColor3f(0.0f, 0.0f, 1.0f);
GL.glVertex3f(0.5f, -0.5f, 0.5f);
GL.glColor3f(0.0f, 1.0f, 0.0f);
GL.glVertex3f(-0.5f, -0.5f, 0.5f);
GL.glColor3f(0.0f, 0.0f, 1.0f);
GL.glVertex3f(-0.5f, -0.5f, -0.5f);
GL.glColor3f(0.0f, 1.0f, 0.0f);
GL.glVertex3f(0.5f, -0.5f, -0.5f);
GL.glEnd();
GL.glEndList();
}

void init() {
GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
float[] fogColor = { 1.0f, 1.0f, 1.0f, 1.0f };
GL.glFogfv(GL.GL_FOG_COLOR, fogColor);
GL.glHint(GL.GL_FOG_HINT, GL.GL_DONT_CARE);
GL.glFogf(GL.GL_FOG_START, 0);
GL.glFogf(GL.GL_FOG_DENSITY, 0.0f);
GL.glFogf(GL.GL_FOG_END, 15);
GL.glFogf(GL.GL_FOG_MODE, GL.GL_LINEAR);
GL.glEnable(GL.GL_FOG);
GL.glEnable(GL.GL_DEPTH_TEST);
cubeListIndexBase = GL.glGenLists(1);
createCube();
Runnable timer = new Runnable() {
public void run() {
if (glCanvas.isDisposed()) return;
renderScene();
context.swapBuffers();
glCanvas.getDisplay().timerExec(0, this);
}
};
timer.run();
}

void renderScene() {
GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
GL.glLoadIdentity();
GL.glTranslatef(xPos, yPos, zPos);
GL.glRotatef(rotY, 0.0f, 1.0f, 0.0f);

GL.glCallList(cubeListIndexBase);

GL.glPushMatrix();
GL.glTranslatef(3, 0, -3);
GL.glCallList(cubeListIndexBase);
GL.glPopMatrix();

GL.glPushMatrix();
GL.glTranslatef(-3, 0, -3);
GL.glCallList(cubeListIndexBase);
GL.glPopMatrix();

GL.glPushMatrix();
GL.glTranslatef(0, 0, 4);
GL.glCallList(cubeListIndexBase);
GL.glPopMatrix();

rotY += 0.6f;
}
}

HTH,
Grant

"Selim Yucel" <selimyucel@yahoo.com> wrote in message
news:c8j0ej$1kl$1@eclipse.org...
> Selim Yucel wrote:
>
> > Selim Yucel wrote:
>
> > > I am trying to develop a 3D-viewer as an Eclipse plugin.
> > > Application has a View object extending ViewPart and a canvas is
created
> > > in abstract ViewPart-createPartControl(Composite c) method.
> > > The plug-in shows up with an error message in displaying area.
> > > I tried to debug it couple of times but honestly I got lost in it.
What I
> > > understand is, whenever an instance of GLContext(It is instantiated in
> > > canvas) is created in the application, It suspends with an error
message
> > > like "An error has occurred when creating this view" written on the
canvas
> > > in red. Any explanation why I am getting this message?
> > > Thanks in advance..
>
> > Not only GLContext, but any opengl call in (ViewPart
> > abstract)-createPartControl(Composite c) results in the same way.
> > Any idea why?
> > Thanks.
>
> I think I can narrow my question down to how to create an instance of
> GLContext in view objects's createPartControl(Composite c) method.
> Is this doable?
> The project is a 3D viewer and working fine either in swt opengl or jogl..
> The plan is to modify existing project in to an eclipse-plug-in.
> Is this plan applicable with existing PDE capabilities?
>
> I will deeply appreciate a recommendation.
> Thanks.
>
>
>
Re: PDE can not detect opengl classes. [message #436650 is a reply to message #436648] Fri, 21 May 2004 14:40 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
I see that my example snippet was 8 minutes obsolete <g>. Anyways, I'm able
to run my example view in a self-hosted eclipse, so pde is picking up the
opengl plugin for me. Something must be set up differently on your end, or
you're using an older eclipse where this did not work for some reason (?).

Grant

"Selim Yucel" <selimyucel@yahoo.com> wrote in message
news:c8l3ff$khe$1@eclipse.org...
> Selim Yucel wrote:
>
> > Selim Yucel wrote:
>
> > > Selim Yucel wrote:
>
> > > > I am trying to develop a 3D-viewer as an Eclipse plugin.
> > > > Application has a View object extending ViewPart and a canvas is
created
> > > > in abstract ViewPart-createPartControl(Composite c) method.
> > > > The plug-in shows up with an error message in displaying area.
> > > > I tried to debug it couple of times but honestly I got lost in it.
What I
> > > > understand is, whenever an instance of GLContext(It is instantiated
in
> > > > canvas) is created in the application, It suspends with an error
message
> > > > like "An error has occurred when creating this view" written on the
> canvas
> > > > in red. Any explanation why I am getting this message?
> > > > Thanks in advance..
>
> > > Not only GLContext, but any opengl call in (ViewPart
> > > abstract)-createPartControl(Composite c) results in the same way.
> > > Any idea why?
> > > Thanks.
>
> > I think I can narrow my question down to how to create an instance of
> > GLContext in view objects's createPartControl(Composite c) method.
> > Is this doable?
> > The project is a 3D viewer and working fine either in swt opengl or
jogl..
> > The plan is to modify existing project in to an eclipse-plug-in.
> > Is this plan applicable with existing PDE capabilities?
>
> > I will deeply appreciate a recommendation.
> > Thanks.
>
> Class launcher can not launch classes from opengl plugin although it was
> included in dependencies and every where. In short PDE can not detect
> opengl classes.
> I included all God t... opengl source files in the project and It WORKS
!!.
>
>
>
>
>
Re: Is this doable? [message #436698 is a reply to message #436649] Fri, 21 May 2004 20:25 Go to previous messageGo to next message
selim is currently offline selimFriend
Messages: 31
Registered: July 2009
Member
Thanks Grant,
Now, I am more certain about my plugin design.
Eclipse that use is fairly new(dowloaded a couple of days ago), but I am
not sure for swtopengl library.
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/opengl/opengl.html
is the link I downloaded SWTopengl plugin.
It looks pretty straightforward since I prefer using wizard.
What else am I supposed to do other than extracting
swt-opengl-2.1-win32.zip (including SWTopengl plugin in eclipse/plugins)
and include it in project-dependencies?








Grant Gayed wrote:

> Following is an example of a view class with a GLContext:

> import org.eclipse.swt.*;
> import org.eclipse.swt.graphics.*;
> import org.eclipse.swt.opengl.*;
> import org.eclipse.swt.widgets.*;
> import org.eclipse.ui.part.*;

> public class SampleView extends ViewPart {
> private Canvas glCanvas;
> private GLContext context;
> private float rotY = 0.0f;
> private float yPos = 0.0f, xPos = 0.0f, zPos = -15.0f;
> private int cubeListIndexBase;

> public void createPartControl(Composite parent) {
> glCanvas = new Canvas(parent, SWT.BORDER);
> glCanvas.setBounds(0,0,400,400);
> context = new GLContext(glCanvas);
> context.setCurrent();
> Rectangle rect = glCanvas.getClientArea();
> int width = rect.width;
> int height = rect.height;
> height = Math.max(height, 1);
> GL.glViewport(0, 0, width, height);
> GL.glMatrixMode(GL.GL_PROJECTION);
> GL.glLoadIdentity();
> float fAspect = (float) width / (float) height;
> GLU.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
> GL.glMatrixMode(GL.GL_MODELVIEW);
> GL.glLoadIdentity();
> init();
> }

> public void setFocus() {
> }

> // OpenGL-specific methods...

> void createCube() {
> GL.glNewList(cubeListIndexBase, GL.GL_COMPILE);
> GL.glBegin(GL.GL_QUADS);
> // front
> GL.glColor3f(0.0f, 1.0f, 0.0f);
> GL.glVertex3f(-0.5f, -0.5f, 0.5f); // bottom left
> GL.glColor3f(0.0f, 0.0f, 1.0f);
> GL.glVertex3f(0.5f, -0.5f, 0.5f); // bottom right
> GL.glColor3f(1.0f, 1.0f, 0.0f);
> GL.glVertex3f(0.5f, 0.5f, 0.5f); // top right
> GL.glColor3f(1.0f, 0.0f, 0.0f);
> GL.glVertex3f(-0.5f, 0.5f, 0.5f); // top left
> // back
> GL.glColor3f(0.0f, 0.0f, 1.0f);
> GL.glVertex3f(-0.5f, -0.5f, -0.5f); // bottom left
> GL.glColor3f(0.0f, 1.0f, 0.0f);
> GL.glVertex3f(0.5f, -0.5f, -0.5f); // bottom right
> GL.glColor3f(1.0f, 0.0f, 0.0f);
> GL.glVertex3f(0.5f, 0.5f, -0.5f); // top right
> GL.glColor3f(1.0f, 1.0f, 0.0f);
> GL.glVertex3f(-0.5f, 0.5f, -0.5f); // top left
> // left
> GL.glColor3f(0.0f, 0.0f, 1.0f);
> GL.glVertex3f(-0.5f, -0.5f, -0.5f); // bottom left
> GL.glColor3f(0.0f, 1.0f, 0.0f);
> GL.glVertex3f(-0.5f, -0.5f, 0.5f); // bottom right
> GL.glColor3f(1.0f, 0.0f, 0.0f);
> GL.glVertex3f(-0.5f, 0.5f, 0.5f); // top right
> GL.glColor3f(1.0f, 1.0f, 0.0f);
> GL.glVertex3f(-0.5f, 0.5f, -0.5f); // top left
> // right
> GL.glColor3f(0.0f, 0.0f, 1.0f);
> GL.glVertex3f(0.5f, -0.5f, 0.5f); // bottom left
> GL.glColor3f(0.0f, 1.0f, 0.0f);
> GL.glVertex3f(0.5f, -0.5f, -0.5f); // bottom right
> GL.glColor3f(1.0f, 0.0f, 0.0f);
> GL.glVertex3f(0.5f, 0.5f, -0.5f); // top right
> GL.glColor3f(1.0f, 1.0f, 0.0f);
> GL.glVertex3f(0.5f, 0.5f, 0.5f); // top left
> // top
> GL.glColor3f(1.0f, 0.0f, 0.0f);
> GL.glVertex3f(0.5f, 0.5f, -0.5f);
> GL.glColor3f(1.0f, 1.0f, 0.0f);
> GL.glVertex3f(-0.5f, 0.5f, -0.5f);
> GL.glColor3f(1.0f, 0.0f, 0.0f);
> GL.glVertex3f(-0.5f, 0.5f, 0.5f);
> GL.glColor3f(1.0f, 1.0f, 0.0f);
> GL.glVertex3f(0.5f, 0.5f, 0.5f);
> // bottom
> GL.glColor3f(0.0f, 0.0f, 1.0f);
> GL.glVertex3f(0.5f, -0.5f, 0.5f);
> GL.glColor3f(0.0f, 1.0f, 0.0f);
> GL.glVertex3f(-0.5f, -0.5f, 0.5f);
> GL.glColor3f(0.0f, 0.0f, 1.0f);
> GL.glVertex3f(-0.5f, -0.5f, -0.5f);
> GL.glColor3f(0.0f, 1.0f, 0.0f);
> GL.glVertex3f(0.5f, -0.5f, -0.5f);
> GL.glEnd();
> GL.glEndList();
> }

> void init() {
> GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
> float[] fogColor = { 1.0f, 1.0f, 1.0f, 1.0f };
> GL.glFogfv(GL.GL_FOG_COLOR, fogColor);
> GL.glHint(GL.GL_FOG_HINT, GL.GL_DONT_CARE);
> GL.glFogf(GL.GL_FOG_START, 0);
> GL.glFogf(GL.GL_FOG_DENSITY, 0.0f);
> GL.glFogf(GL.GL_FOG_END, 15);
> GL.glFogf(GL.GL_FOG_MODE, GL.GL_LINEAR);
> GL.glEnable(GL.GL_FOG);
> GL.glEnable(GL.GL_DEPTH_TEST);
> cubeListIndexBase = GL.glGenLists(1);
> createCube();
> Runnable timer = new Runnable() {
> public void run() {
> if (glCanvas.isDisposed()) return;
> renderScene();
> context.swapBuffers();
> glCanvas.getDisplay().timerExec(0, this);
> }
> };
> timer.run();
> }

> void renderScene() {
> GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
> GL.glLoadIdentity();
> GL.glTranslatef(xPos, yPos, zPos);
> GL.glRotatef(rotY, 0.0f, 1.0f, 0.0f);

> GL.glCallList(cubeListIndexBase);

> GL.glPushMatrix();
> GL.glTranslatef(3, 0, -3);
> GL.glCallList(cubeListIndexBase);
> GL.glPopMatrix();

> GL.glPushMatrix();
> GL.glTranslatef(-3, 0, -3);
> GL.glCallList(cubeListIndexBase);
> GL.glPopMatrix();

> GL.glPushMatrix();
> GL.glTranslatef(0, 0, 4);
> GL.glCallList(cubeListIndexBase);
> GL.glPopMatrix();

> rotY += 0.6f;
> }
> }

> HTH,
> Grant

> "Selim Yucel" <selimyucel@yahoo.com> wrote in message
> news:c8j0ej$1kl$1@eclipse.org...
> > Selim Yucel wrote:
> >
> > > Selim Yucel wrote:
> >
> > > > I am trying to develop a 3D-viewer as an Eclipse plugin.
> > > > Application has a View object extending ViewPart and a canvas is
> created
> > > > in abstract ViewPart-createPartControl(Composite c) method.
> > > > The plug-in shows up with an error message in displaying area.
> > > > I tried to debug it couple of times but honestly I got lost in it.
> What I
> > > > understand is, whenever an instance of GLContext(It is instantiated in
> > > > canvas) is created in the application, It suspends with an error
> message
> > > > like "An error has occurred when creating this view" written on the
> canvas
> > > > in red. Any explanation why I am getting this message?
> > > > Thanks in advance..
> >
> > > Not only GLContext, but any opengl call in (ViewPart
> > > abstract)-createPartControl(Composite c) results in the same way.
> > > Any idea why?
> > > Thanks.
> >
> > I think I can narrow my question down to how to create an instance of
> > GLContext in view objects's createPartControl(Composite c) method.
> > Is this doable?
> > The project is a 3D viewer and working fine either in swt opengl or jogl..
> > The plan is to modify existing project in to an eclipse-plug-in.
> > Is this plan applicable with existing PDE capabilities?
> >
> > I will deeply appreciate a recommendation.
> > Thanks.
> >
> >
> >
Re: PDE can not detect opengl classes. [message #439731 is a reply to message #436648] Thu, 15 July 2004 05:19 Go to previous message
Ted is currently offline TedFriend
Messages: 22
Registered: July 2009
Junior Member
Selim Yucel wrote:

I have met the same problem with the GLContext on Linux motif 3.0
version Eclipse to run OpenGL examples.

Which platform you are running?

Thanks.

Ted

> Selim Yucel wrote:
>
>
>>Selim Yucel wrote:
>
>
>>>Selim Yucel wrote:
>
>
>>>>I am trying to develop a 3D-viewer as an Eclipse plugin.
>>>>Application has a View object extending ViewPart and a canvas is created
>>>>in abstract ViewPart-createPartControl(Composite c) method.
>>>>The plug-in shows up with an error message in displaying area.
>>>>I tried to debug it couple of times but honestly I got lost in it. What I
>>>>understand is, whenever an instance of GLContext(It is instantiated in
>>>>canvas) is created in the application, It suspends with an error message
>>>>like "An error has occurred when creating this view" written on the
>
> canvas
>
>>>>in red. Any explanation why I am getting this message?
>>>>Thanks in advance..
>
>
>>>Not only GLContext, but any opengl call in (ViewPart
>>>abstract)-createPartControl(Composite c) results in the same way.
>>>Any idea why?
>>>Thanks.
>
>
>>I think I can narrow my question down to how to create an instance of
>>GLContext in view objects's createPartControl(Composite c) method.
>>Is this doable?
>>The project is a 3D viewer and working fine either in swt opengl or jogl..
>>The plan is to modify existing project in to an eclipse-plug-in.
>>Is this plan applicable with existing PDE capabilities?
>
>
>>I will deeply appreciate a recommendation.
>>Thanks.
>
>
> Class launcher can not launch classes from opengl plugin although it was
> included in dependencies and every where. In short PDE can not detect
> opengl classes.
> I included all God t... opengl source files in the project and It WORKS !!.
>
>
>
>
>
Previous Topic:Can we use JGoodies with Swt?
Next Topic:OpenGL in SWT ??
Goto Forum:
  


Current Time: Fri Apr 26 02:51:06 GMT 2024

Powered by FUDForum. Page generated in 0.03599 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top