What happened to window.setSurfaceSize?

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

What happened to window.setSurfaceSize?

Luska72
Hey.

I need to set my window's surface in pixel units, but window.setSurfaceSize(int, int) isn't a method I can call from a GLWindow window.

This is how I am declaring my window (only typing relevant code):

// class level:
final GLWindow window;

// method level:
glp = GLProfile.getDefault();
caps = new GLCapabilities(glp);
window = GLWindow.create(caps);
window.setSize(WIDTH*SCALE, HEIGHT*SCALE); // width and scale declared above..
window.setVisible(true);
window.setTitle("NEWT Window");
// ...

It's a VERY basic window, and I don't know why window.setSurfaceSize(int, int) doesn't exist.

The documentation for the method can be found here:
http://jogamp.org/deployment/webstart-next/javadoc/jogl/javadoc/com/jogamp/newt/opengl/GLWindow.html#setSurfaceSize%28int,%20int%29

I hope someone can tell me how I can access it, thanks so much! :)
Reply | Threaded
Open this post in threaded view
|

Re: What happened to window.setSurfaceSize?

gouessej
Administrator
Hi

As JOGL is open source, your first reflex should consist in looking at the source code:
https://github.com/sgothel/jogl/blob/master/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java#L507

GLWindow.setSurfaceSize() is still available. Please use the very latest version of JOGL.
Julien Gouesse | Personal blog | Website