Not switching to perspective

Hello JGO, I have an issue with OpenGL where it doesn’t seem to be responding to gluLookat or perspective switching. I’d like to see the reason why, thanks

Both pre and post ready3D

Main.java

http://pastebin.com/mZURbPed

vertex.glsl

#version 150 core

in vec4 in_Position;
in vec4 in_Color;

out vec4 pass_Color;

void main(void) {
	gl_Position = in_Position;
	pass_Color = in_Color;
}

Don’t you have to multiply in_Position by the modelview and/or the projection matrices?

You should know that gluLookAt works with the (deprecated) default matrices from opengl. So it works with the GL_MODELVIEW (I think).

An yes. You need to give the matrices to your shader and additionally you need to multiply your position by the matrix.

Yup like the others said: you need to manually multiply the position with the matrix. Since you are using version 150, the matrix is already given to you as a built-in uniform “gl_ModelViewProjectionMatrix” so your code would do:


gl_Position = in_Position * gl_ModelViewProjectionMatrix;