Roi Atalla avatar Roi Atalla committed c55cc89

Even more awesome.

Comments (0)

Files changed (2)

src/main/java/com/ra4king/opengl/test/Test.java

 		modelViewMatrixUniform = glGetUniformLocation(program.getProgram(), "modelViewMatrix");
 		
 		modelViewMatrix = new Matrix4().clearToIdentity();
-		modelViewMatrix.translate(0, -8, -20).rotate((float)Math.PI, 0, 1, 0);
+		modelViewMatrix.translate(0, -7, -20).rotate(20*(float)Math.PI/180, 1, 0, 0).rotate(-45*(float)Math.PI/180, 0, 1, 0);
 		
 		program.begin();
 		glUniformMatrix4(perspectiveMatrix, false, new Matrix4().clearToPerspective((float)Math.PI/2, getWidth(), getHeight(), 1, 1000).getBuffer());

src/main/java/com/ra4king/opengl/test/test.vert

 
 void main()
 {
-	gl_Position = perspectiveMatrix * (modelViewMatrix * position);
+	gl_Position = perspectiveMatrix * modelViewMatrix * position;
 	theColor = color;
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.