Roi Atalla avatar Roi Atalla committed 0ef567b

Fixed small mistake in Example1_1 where I created a FloatBuffer with capacity of 24 instead of 12. Credit goes to Whiteclaws from #ludumdare channel on IRC server AfterNET.

Comments (0)

Files changed (1)

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

 		vbo = glGenBuffers();
 		
 		glBindBuffer(GL_ARRAY_BUFFER, vbo);
-		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(24).put(new float[] { 0.75f, 0.75f, 0.0f, 1.0f,
+		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);
 		
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.