View Full Version : problem with window resizing (function reshape)

10-18-2010, 02:30 PM
Hello, I'm doing a job that draw 10 points 2D and the aim then is to make various kinds of curves, being able to move these points.
My problem is when I change the window, resize the drawing is a correct but then can not move any point. I have to convert the 2D points?

My function is to reshape the following

public void reshape(GLAutoDrawable gLDrawable, int x, int y, int width, int height) {
GL gl = gLDrawable.getGL();
this.width = width;
this.height = height;
gl.glViewport(0, 0, width, height);
gl.glOrtho(0, width, height, 0, 0, 1);
//new GLU().gluOrtho2D(0, 600, 600, 0); */

any suggestion?? thanks