I am fairly new to using these , I usually either do it hands on or work in 2d .Currently the issue appears to arrise with gl_ModelViewProjectionMatrix * position , without gl_Model… it renders a triangle on the screen however with it it doesnt render.
Here is the current initialisation.
try {
Display.setDisplayMode(new DisplayMode(800, 600));
Display.sync(60);
Display.create();
} catch (LWJGLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f, 800.0f / 600.0f, 1.0f, 500.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
and my attempt at the shader
attribute vec3 vertex;
attribute vec2 texturecoordinate;
uniform vec3 rotation;
uniform vec3 rotation_centre;
void main(){
gl_Position = gl_ModelViewProjectionMatrix * vec4(vertex,1);
}
I am currently using a VBO , I am not too sure if there is anything extra that I will need to add to that for it to work , if so or if the code for that is needed just ask.