Commits

Roi Atalla committed 1e64296

Updated LWJGL to version 2.9.1. Also added comment explaining "glBindVertexArray(glGenVertexArrays());" to those unfamiliar with VAOs as they are explained in a later chapter. Thanks to Troubleshoots from JGO for the suggestion.

Comments (0)

Files changed (20)

.idea/codeStyleSettings.xml

               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PUBLIC</MODIFIER>
-                    <MODIFIER>STATIC</MODIFIER>
-                    <MODIFIER>FINAL</MODIFIER>
+                    <FIELD />
+                    <FINAL />
+                    <PUBLIC />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PROTECTED</MODIFIER>
-                    <MODIFIER>STATIC</MODIFIER>
-                    <MODIFIER>FINAL</MODIFIER>
+                    <FIELD />
+                    <FINAL />
+                    <PROTECTED />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PACKAGE_PRIVATE</MODIFIER>
-                    <MODIFIER>STATIC</MODIFIER>
-                    <MODIFIER>FINAL</MODIFIER>
+                    <FIELD />
+                    <FINAL />
+                    <PACKAGE_PRIVATE />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PRIVATE</MODIFIER>
-                    <MODIFIER>STATIC</MODIFIER>
-                    <MODIFIER>FINAL</MODIFIER>
+                    <FIELD />
+                    <FINAL />
+                    <PRIVATE />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PUBLIC</MODIFIER>
-                    <MODIFIER>STATIC</MODIFIER>
+                    <FIELD />
+                    <PUBLIC />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PROTECTED</MODIFIER>
-                    <MODIFIER>STATIC</MODIFIER>
+                    <FIELD />
+                    <PROTECTED />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PACKAGE_PRIVATE</MODIFIER>
-                    <MODIFIER>STATIC</MODIFIER>
+                    <FIELD />
+                    <PACKAGE_PRIVATE />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PRIVATE</MODIFIER>
-                    <MODIFIER>STATIC</MODIFIER>
+                    <FIELD />
+                    <PRIVATE />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PUBLIC</MODIFIER>
-                    <MODIFIER>FINAL</MODIFIER>
+                    <FIELD />
+                    <FINAL />
+                    <PUBLIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PROTECTED</MODIFIER>
-                    <MODIFIER>FINAL</MODIFIER>
+                    <FIELD />
+                    <FINAL />
+                    <PROTECTED />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PACKAGE_PRIVATE</MODIFIER>
-                    <MODIFIER>FINAL</MODIFIER>
+                    <FIELD />
+                    <FINAL />
+                    <PACKAGE_PRIVATE />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PRIVATE</MODIFIER>
-                    <MODIFIER>FINAL</MODIFIER>
+                    <FIELD />
+                    <FINAL />
+                    <PRIVATE />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PUBLIC</MODIFIER>
+                    <FIELD />
+                    <PUBLIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PROTECTED</MODIFIER>
+                    <FIELD />
+                    <PROTECTED />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PACKAGE_PRIVATE</MODIFIER>
+                    <FIELD />
+                    <PACKAGE_PRIVATE />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>FIELD</TYPE>
-                    <MODIFIER>PRIVATE</MODIFIER>
+                    <FIELD />
+                    <PRIVATE />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
-                  <TYPE>FIELD</TYPE>
+                  <FIELD />
                 </match>
               </rule>
               <rule>
                 <match>
-                  <TYPE>CONSTRUCTOR</TYPE>
+                  <CONSTRUCTOR />
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>METHOD</TYPE>
-                    <MODIFIER>STATIC</MODIFIER>
+                    <METHOD />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
-                  <TYPE>METHOD</TYPE>
+                  <METHOD />
                 </match>
               </rule>
               <rule>
                 <match>
-                  <TYPE>ENUM</TYPE>
+                  <ENUM />
                 </match>
               </rule>
               <rule>
                 <match>
-                  <TYPE>INTERFACE</TYPE>
+                  <INTERFACE />
                 </match>
               </rule>
               <rule>
                 <match>
                   <AND>
-                    <TYPE>CLASS</TYPE>
-                    <MODIFIER>STATIC</MODIFIER>
+                    <CLASS />
+                    <STATIC />
                   </AND>
                 </match>
               </rule>
               <rule>
                 <match>
-                  <TYPE>CLASS</TYPE>
+                  <CLASS />
                 </match>
               </rule>
             </rules>

libs/lwjgl/lwjgl.jar

Binary file modified.

libs/lwjgl/lwjgl_util.jar

Binary file modified.

libs/lwjgl/natives/liblwjgl.jnilib

Binary file modified.

libs/lwjgl/natives/liblwjgl.so

Binary file modified.

libs/lwjgl/natives/liblwjgl64.so

Binary file modified.

libs/lwjgl/natives/lwjgl.dll

Binary file modified.

libs/lwjgl/natives/lwjgl64.dll

Binary file modified.

src/com/ra4king/opengl/arcsynthesis/gl33/chapter1/Example1_1.java

 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(12).put(new float[] { 0.75f, 0.75f, 0.0f, 1.0f,
 				0.75f, -0.75f, 0.0f, 1.0f,
 				-0.75f, -0.75f, 0.0f, 1.0f }).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
-		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
 	}
 	
 	@Override

src/com/ra4king/opengl/arcsynthesis/gl33/chapter2/example1/Example2_1.java

 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(12).put(new float[] { 0.75f, 0.75f, 0.0f, 1.0f,
 				0.75f, -0.75f, 0.0f, 1.0f,
 				-0.75f, -0.75f, 0.0f, 1.0f }).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
-		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
 	}
 	
 	@Override

src/com/ra4king/opengl/arcsynthesis/gl33/chapter2/example2/Example2_2.java

 				1.0f, 0.0f, 0.0f, 1.0f,
 				0.0f, 1.0f, 0.0f, 1.0f,
 				0.0f, 0.0f, 1.0f, 1.0f }).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
-		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
 	}
 	
 	@Override

src/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example1/Example3_1.java

 		
 		glBindBuffer(GL_ARRAY_BUFFER, vbo);
 		glBufferData(GL_ARRAY_BUFFER, vertexData, GL_STREAM_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
-		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
 	}
 	
 	@Override

src/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example2/Example3_2.java

 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(12).put(new float[] { 0.25f, 0.25f, 0.0f, 1.0f,
 				0.25f, -0.25f, 0.0f, 1.0f,
 				-0.25f, -0.25f, 0.0f, 1.0f }).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
-		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
 	}
 	
 	@Override

src/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example3/Example3_3.java

 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(12).put(new float[] { 0.25f, 0.25f, 0.0f, 1.0f,
 				0.25f, -0.25f, 0.0f, 1.0f,
 				-0.25f, -0.25f, 0.0f, 1.0f }).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
-		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
 	}
 	
 	@Override

src/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example4/Example3_4.java

 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(12).put(new float[] { 0.25f, 0.25f, 0.0f, 1.0f,
 				0.25f, -0.25f, 0.0f, 1.0f,
 				-0.25f, -0.25f, 0.0f, 1.0f }).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
-		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
 	}
 	
 	@Override

src/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example1/Example4_1.java

 		
 		glBindBuffer(GL_ARRAY_BUFFER, vbo);
 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(data.length).put(data).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
 		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
-		
 		glEnable(GL_CULL_FACE);
 		glCullFace(GL_BACK);
 		glFrontFace(GL_CW);

src/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example2/Example4_2.java

 		
 		glBindBuffer(GL_ARRAY_BUFFER, vbo);
 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(data.length).put(data).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
 		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
-		
 		glEnable(GL_CULL_FACE);
 		glCullFace(GL_BACK);
 		glFrontFace(GL_CW);

src/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example3/Example4_3.java

 		
 		glBindBuffer(GL_ARRAY_BUFFER, vbo);
 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(data.length).put(data).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
 		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
-		
 		glEnable(GL_CULL_FACE);
 		glCullFace(GL_BACK);
 		glFrontFace(GL_CW);

src/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example4/Example4_4.java

 		
 		glBindBuffer(GL_ARRAY_BUFFER, vbo);
 		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(data.length).put(data).flip(), GL_STATIC_DRAW);
+		glBindBuffer(GL_ARRAY_BUFFER, 0);
 		
+		// In core OpenGL, Vertex Array Objects (VAOs) are required for all draw calls. VAOs will be explained in Chapter 5.
 		glBindVertexArray(glGenVertexArrays());
 		
-		glBindBuffer(GL_ARRAY_BUFFER, 0);
-		
 		glEnable(GL_CULL_FACE);
 		glCullFace(GL_BACK);
 		glFrontFace(GL_CW);

src/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example1/Example5_1.java

 		glVertexAttribPointer(1, 4, GL_FLOAT, false, 0, 36 * 3 * 4);
 		glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vbo2);
 		
-		glBindVertexArray(0);
-		
 		vao2 = glGenVertexArrays();
 		glBindVertexArray(vao2);