Java OpenGL
Posts  1 - 1  of  1
lukasz20p
Hello. I am writing a thesis in electrical capacitance tomography using the HAVS algorithm for 3D imaging. Executes the current zoom using the mouse roller. Podpiąłem mouseWheelMoved and gives me good value (1 or -1). Now in GLEventListener the generation of image display () I wanted to zoom through glScale. Here is a piece of code responsible for:
switch (zoom) {
case -1:
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
gl.glScalef(1.05f, 1.05f, 1.05f);
System.out.println(zoom);
zoom = 0;
break;
case 1:
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
gl.glScalef(0.95f, 0.95f, 0.95f);
System.out.println(zoom);
zoom = 0;
break;
}

Please help because it does not work, what is wrong? Regards.
Save
Cancel
Reply
 
x
OK