views:

78

answers:

1

Hi guys... I just built a Java OpenGL application in Eclipse... and when i was trying to export the application using EclipseP5Exporter, it requires me to initialize the window size (not viewport size, a window may contain several viewports).

I already googled some solutions in the net but I can't seem to get anything useful..

I've tried the method: glutInitWindowSize(int width, int height);

but it seems to work only in C and python openGL.

even if i append the glut before the method (glut.glutInitWindowSize()) eclipse doesn't recognize that method..

So if you guys have any suggestions please let me know...

Thank you....

+2  A: 

I'm guessing by "Java OpenGL" you mean JOGL.

If this is the case, then you have either a GLCanvas or GLJPanel. Either of these should be inside a awt Frame or swing JFrame. Both of these inherit from awt.Window, which has the setSize(int,int) method.

In short, use the setSize method of your Frame or JFrame.

JOGL's implementation of GLUT only includes the drawing functions, not window management functions. Window creation is handled by Java via AWT or Swing. You might want to learn more about Java if you aren't familiar with these concepts.

Ricket
Thanks buddy... this is the exact solution that I'm looking for..Cheers
tommy-susanto