hi its been a while since i used jogl and i have noticed quite some changes
so i took a look at some examples but i am still a bit stuck with glu.gluLookAt()
is there some new method to do this now or?
this is my code:
import javax.media.opengl.*;
import javax.media.opengl.glu.*;
public class TestRenderer implements GLEventListener
{
private GL gl;
private GLU glu;
private GLAutoDrawable glDrawable;
public void init(GLAutoDrawable drawable)
{
this.gl = drawable.getGL();
this.glDrawable = drawable;
glu = new GLU();
drawable.setGL( new DebugGL(gl));
System.out.println("Init GL is " + gl.getClass().getName());
}
public void display(GLAutoDrawable drawable)
{
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT );
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
gl.glColor3f(1.0f, 0.0f, 0.0f );
gl.glBegin( GL.GL_TRIANGLES );
gl.glVertex3f( 0.0f, 0.0f, 0.0f );
gl.glVertex3f( 1.0f, 0.0f, 0.0f );
gl.glVertex3f( 1.0f, 1.0f, 0.0f );
gl.glEnd();
gl.glBegin( GL.GL_TRIANGLES );
gl.glVertex3f( 0.0f, 0.0f, 0.0f );
gl.glVertex3f( -1.0f, 0.0f, 0.0f );
gl.glVertex3f( -1.0f, -1.0f, 0.0f );
gl.glEnd();
glu.gluLookAt( 0.0, 10.0, -10.0,
0.0, 0.0, 0.0,
0.0, 1.0, 0.0);
}
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height)
{
}
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
{
}
}
i can change the values of first line in glu.gluLookAt at anything i want the view still doenst change?
what do i do wrong? thx for the help