Permalink
Browse files

metadata change

  • Loading branch information...
1 parent a6c671a commit a5f42bd29ae565efb52c2ccce80ffcf5e23a3a13 @alihelmy committed Apr 22, 2012
Showing with 686 additions and 9 deletions.
  1. +12 −0 .metadata/.log
  2. +58 −0 .metadata/.plugins/org.eclipse.core.resources/.history/43/d0c805128a8c00111f1581251e4956b9
  3. +93 −0 .metadata/.plugins/org.eclipse.core.resources/.history/46/c00dd7abc18c00111abff6c8b064978b
  4. +94 −0 .metadata/.plugins/org.eclipse.core.resources/.history/57/20c78fa7c18c00111abff6c8b064978b
  5. +93 −0 .metadata/.plugins/org.eclipse.core.resources/.history/5b/002b90a9c18c00111abff6c8b064978b
  6. +94 −0 .metadata/.plugins/org.eclipse.core.resources/.history/d/d0740e2bc18c00111abff6c8b064978b
  7. +94 −0 .metadata/.plugins/org.eclipse.core.resources/.history/df/002db2d2bf8c00111abff6c8b064978b
  8. +92 −0 .metadata/.plugins/org.eclipse.core.resources/.history/f3/80942cb5c18c00111abff6c8b064978b
  9. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.indexes/7/2e/history.index
  10. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.indexes/history.index
  11. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.markers
  12. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.markers.snap
  13. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.syncinfo.snap
  14. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/org.eclipse.jdt.core/state.dat
  15. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonTwo/.indexes/3e/f4/history.index
  16. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonTwo/.markers
  17. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonTwo/.markers.snap
  18. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/libs/.markers.snap
  19. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/libs/.syncinfo.snap
  20. BIN .metadata/.plugins/org.eclipse.core.resources/.projects/libs/org.eclipse.jdt.core/state.dat
  21. BIN .metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap
  22. BIN .metadata/.plugins/org.eclipse.core.resources/.root/1.tree
  23. BIN .metadata/.plugins/org.eclipse.core.resources/.root/2.tree
  24. BIN .metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
  25. BIN .metadata/.plugins/org.eclipse.core.resources/.snap
  26. +3 −0 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ant.ui.prefs
  27. +1 −1 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
  28. +2 −0 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
  29. +2 −0 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.java.ui.prefs
  30. +1 −0 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
  31. +1 −1 .metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml
  32. +2 −0 .metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml
  33. +1 −1 .metadata/.plugins/org.eclipse.e4.workbench/deltas.xml
  34. BIN .metadata/.plugins/org.eclipse.jdt.core/2791608477.index
  35. BIN .metadata/.plugins/org.eclipse.jdt.core/3452083210.index
  36. +12 −1 .metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt
  37. BIN .metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
  38. +2 −2 .metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml
  39. +11 −1 .metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
  40. BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png
  41. BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png
  42. BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/2.png
  43. BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/3.png
  44. BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/4.png
  45. +1 −1 .../.plugins/org.eclipse.ltk.core.refactoring/.refactorings/LessonOne/2012/4/16/refactorings.history
  46. +1 −0 ...ta/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/LessonOne/2012/4/16/refactorings.index
  47. +5 −0 .metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml
  48. +10 −0 .metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
  49. +1 −0 .metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
  50. +0 −1 LessonTwo/lwjgltutorial/lessonTwo/ShaderUtilities.java
View
12 .metadata/.log
@@ -25,3 +25,15 @@ Java Model Exception: Java Model Status [Timed out while retrieving the attached
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!SUBENTRY 1 org.eclipse.jdt.core 4 1012 2012-04-22 16:46:57.957
!MESSAGE Timed out while retrieving the attached javadoc for BufferedReader [in BufferedReader.class [in java.io [in C:\Program Files\Java\jre6\lib\rt.jar]]]
+!SESSION 2012-04-22 23:08:23.176 -----------------------------------------------
+eclipse.buildId=I20120315-1300
+java.version=1.6.0_26
+java.vendor=Sun Microsystems Inc.
+BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
+Framework arguments: -product org.eclipse.epp.package.java.product
+Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
+
+!ENTRY org.eclipse.help.base 4 4 2012-04-22 23:20:02.119
+!MESSAGE Help documentation could not be indexed completely.
+!SUBENTRY 1 org.eclipse.help.base 4 4 2012-04-22 23:20:02.119
+!MESSAGE Help document /org.eclipse.mylyn.help.ui/doc/notices.html cannot be opened.
View
58 .metadata/.plugins/org.eclipse.core.resources/.history/43/d0c805128a8c00111f1581251e4956b9
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- WARNING: Eclipse auto-generated file.
+ Any modifications will be overwritten.
+ To include a user specific buildfile here, simply create one in the same
+ directory with the processing instruction <?eclipse.ant.import?>
+ as the first entry and export the buildfile again. -->
+<project basedir="." default="build" name="LessonOne">
+ <property environment="env"/>
+ <property name="libs.location" value="../libs"/>
+ <property name="debuglevel" value="source,lines,vars"/>
+ <property name="target" value="1.6"/>
+ <property name="source" value="1.6"/>
+ <path id="LessonOne.classpath">
+ <pathelement location="bin"/>
+ <pathelement location="${libs.location}/lwjgl_util.jar"/>
+ <pathelement location="${libs.location}/lwjgl.jar"/>
+ </path>
+ <target name="init">
+ <mkdir dir="bin"/>
+ <copy includeemptydirs="false" todir="bin">
+ <fileset dir="src">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+ <target name="clean">
+ <delete dir="bin"/>
+ </target>
+ <target depends="clean" name="cleanall"/>
+ <target depends="build-subprojects,build-project" name="build"/>
+ <target name="build-subprojects"/>
+ <target depends="init" name="build-project">
+ <echo message="${ant.project.name}: ${ant.file}"/>
+ <javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
+ <src path="src"/>
+ <classpath refid="LessonOne.classpath"/>
+ </javac>
+ </target>
+ <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
+ <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
+ <copy todir="${ant.library.dir}">
+ <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
+ </copy>
+ <unzip dest="${ant.library.dir}">
+ <patternset includes="jdtCompilerAdapter.jar"/>
+ <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
+ </unzip>
+ </target>
+ <target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
+ <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ <antcall target="build"/>
+ </target>
+ <target name="LessonOne">
+ <java classname="lwjglTutorial.lessonOne.LessonOne" failonerror="true" fork="yes">
+ <classpath refid="LessonOne.classpath"/>
+ </java>
+ </target>
+</project>
View
93 .metadata/.plugins/org.eclipse.core.resources/.history/46/c00dd7abc18c00111abff6c8b064978b
@@ -0,0 +1,93 @@
+package lwjgltutorial.lessonTwo;
+
+import static org.lwjgl.opengl.ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCompileShaderARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCreateShaderObjectARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetInfoLogARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetObjectParameterARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glShaderSourceARB;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.opengl.ARBFragmentShader;
+import org.lwjgl.opengl.ARBVertexShader;
+
+public class ShaderUtilities {
+
+ private static boolean verboseValidityCheck=false;
+ private static final String SHADERS_ROOT_PATH="shaders";
+
+ public static int createFragmentShader(String pathToShaderFile) {
+ int fragmentShader=createShader(pathToShaderFile, ARBFragmentShader.GL_FRAGMENT_SHADER_ARB);
+ return fragmentShader;
+ }
+
+ public static int createVertexShader(String pathToShaderFile) {
+ int vertexShader=createShader(pathToShaderFile, ARBVertexShader.GL_VERTEX_SHADER_ARB);
+ return vertexShader;
+ }
+
+ public static int createShader(String shaderFileName, int shaderType) {
+ String shaderFilePath=SHADERS_ROOT_PATH+File.separator+shaderFileName;
+ int newShader=glCreateShaderObjectARB(shaderType);
+ if(newShader!=0) {
+ String shaderCode=readInShaderCodeFromShaderFile(shaderFilePath);
+ if(shaderCode!=null && !shaderCode.isEmpty()) {
+ glShaderSourceARB(newShader, shaderCode);
+ glCompileShaderARB(newShader);
+ if(isShaderValid(newShader)) {
+ return newShader;
+ }
+ }
+ }
+ //if anything fails, return 0 as error code
+ return 0;
+ }
+
+ private static String readInShaderCodeFromShaderFile(String pathToShaderFile) {
+ try {
+ BufferedReader bufferedReader=new BufferedReader(new FileReader(pathToShaderFile));
+ StringBuffer shaderCodeBuffer=new StringBuffer();
+ String codeLine=bufferedReader.readLine();
+ while(codeLine!=null) {
+ shaderCodeBuffer.append(codeLine+"\n");
+ codeLine=bufferedReader.readLine();
+ }
+ return shaderCodeBuffer.toString();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static boolean isShaderValid(int shaderToCheck) {
+ IntBuffer iVal = BufferUtils.createIntBuffer(1);
+ glGetObjectParameterARB(shaderToCheck, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);
+ int length = iVal.get();
+ boolean isValid = length>1;
+ if (isValid && verboseValidityCheck) {
+ printShaderLogInfo(shaderToCheck, iVal, length);
+ }
+
+ return true;
+ }
+
+ private static void printShaderLogInfo(int shaderToCheck, IntBuffer iVal,
+ int length) {
+ ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
+ iVal.flip();
+ glGetInfoLogARB(shaderToCheck, iVal, infoLog);
+ byte[] infoBytes = new byte[length];
+ infoLog.get(infoBytes);
+ String out = new String(infoBytes);
+ System.out.println("Info log:\n"+out);
+ }
+
+}
View
94 .metadata/.plugins/org.eclipse.core.resources/.history/57/20c78fa7c18c00111abff6c8b064978b
@@ -0,0 +1,94 @@
+package lwjgltutorial.lessonTwo;
+
+import static org.lwjgl.opengl.ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCompileShaderARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCreateShaderObjectARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetInfoLogARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetObjectParameterARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glShaderSourceARB;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.opengl.ARBFragmentShader;
+import org.lwjgl.opengl.ARBVertexShader;
+
+public class ShaderUtilities {
+
+ private static boolean verboseValidityCheck=false;
+ private static final String SHADERS_ROOT_PATH="shaders";
+
+ public static int createFragmentShader(String pathToShaderFile) {
+ int fragmentShader=createShader(pathToShaderFile, ARBFragmentShader.GL_FRAGMENT_SHADER_ARB);
+ return fragmentShader;
+ }
+
+ public static int createVertexShader(String pathToShaderFile) {
+ int vertexShader=createShader(pathToShaderFile, ARBVertexShader.GL_VERTEX_SHADER_ARB);
+ return vertexShader;
+ }
+
+ public static int createShader(String shaderFileName, int shaderType) {
+ String shaderFilePath=SHADERS_ROOT_PATH+File.separator+shaderFileName;
+ int newShader=glCreateShaderObjectARB(shaderType);
+ if(newShader!=0) {
+ String shaderCode=readInShaderCodeFromShaderFile(shaderFilePath);
+ if(shaderCode!=null && !shaderCode.isEmpty()) {
+ glShaderSourceARB(newShader, shaderCode);
+ glCompileShaderARB(newShader);
+ if(isShaderValid(newShader)) {
+ return newShader;
+ }
+ }
+ }
+ //if anything fails, return 0 as error code
+ return 0;
+ }
+
+ private static String readInShaderCodeFromShaderFile(String pathToShaderFile) {
+ try {
+ BufferedReader bufferedReader=new BufferedReader(new FileReader(pathToShaderFile));
+ StringBuffer shaderCodeBuffer=new StringBuffer();
+ String codeLine=bufferedReader.readLine();
+ while(codeLine!=null) {
+ shaderCodeBuffer.append(codeLine+"\n");
+ codeLine=bufferedReader.readLine();
+ }
+ return shaderCodeBuffer.toString();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static boolean isShaderValid(int shaderToCheck) {
+// IntBuffer iVal = BufferUtils.createIntBuffer(1);
+// glGetObjectParameterARB(shaderToCheck, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);
+// int length = iVal.get();
+// boolean isValid = length>1;
+// if (isValid && verboseValidityCheck) {
+// printShaderLogInfo(shaderToCheck, iVal, length);
+// }
+//
+// return isValid;
+ return true;
+ }
+
+ private static void printShaderLogInfo(int shaderToCheck, IntBuffer iVal,
+ int length) {
+ ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
+ iVal.flip();
+ glGetInfoLogARB(shaderToCheck, iVal, infoLog);
+ byte[] infoBytes = new byte[length];
+ infoLog.get(infoBytes);
+ String out = new String(infoBytes);
+ System.out.println("Info log:\n"+out);
+ }
+
+}
View
93 .metadata/.plugins/org.eclipse.core.resources/.history/5b/002b90a9c18c00111abff6c8b064978b
@@ -0,0 +1,93 @@
+package lwjgltutorial.lessonTwo;
+
+import static org.lwjgl.opengl.ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCompileShaderARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCreateShaderObjectARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetInfoLogARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetObjectParameterARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glShaderSourceARB;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.opengl.ARBFragmentShader;
+import org.lwjgl.opengl.ARBVertexShader;
+
+public class ShaderUtilities {
+
+ private static boolean verboseValidityCheck=false;
+ private static final String SHADERS_ROOT_PATH="shaders";
+
+ public static int createFragmentShader(String pathToShaderFile) {
+ int fragmentShader=createShader(pathToShaderFile, ARBFragmentShader.GL_FRAGMENT_SHADER_ARB);
+ return fragmentShader;
+ }
+
+ public static int createVertexShader(String pathToShaderFile) {
+ int vertexShader=createShader(pathToShaderFile, ARBVertexShader.GL_VERTEX_SHADER_ARB);
+ return vertexShader;
+ }
+
+ public static int createShader(String shaderFileName, int shaderType) {
+ String shaderFilePath=SHADERS_ROOT_PATH+File.separator+shaderFileName;
+ int newShader=glCreateShaderObjectARB(shaderType);
+ if(newShader!=0) {
+ String shaderCode=readInShaderCodeFromShaderFile(shaderFilePath);
+ if(shaderCode!=null && !shaderCode.isEmpty()) {
+ glShaderSourceARB(newShader, shaderCode);
+ glCompileShaderARB(newShader);
+ if(isShaderValid(newShader)) {
+ return newShader;
+ }
+ }
+ }
+ //if anything fails, return 0 as error code
+ return 0;
+ }
+
+ private static String readInShaderCodeFromShaderFile(String pathToShaderFile) {
+ try {
+ BufferedReader bufferedReader=new BufferedReader(new FileReader(pathToShaderFile));
+ StringBuffer shaderCodeBuffer=new StringBuffer();
+ String codeLine=bufferedReader.readLine();
+ while(codeLine!=null) {
+ shaderCodeBuffer.append(codeLine+"\n");
+ codeLine=bufferedReader.readLine();
+ }
+ return shaderCodeBuffer.toString();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static boolean isShaderValid(int shaderToCheck) {
+ IntBuffer iVal = BufferUtils.createIntBuffer(1);
+ glGetObjectParameterARB(shaderToCheck, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);
+ int length = iVal.get();
+ boolean isValid = length>1;
+ if (isValid && verboseValidityCheck) {
+ printShaderLogInfo(shaderToCheck, iVal, length);
+ }
+
+ return isValid;
+ }
+
+ private static void printShaderLogInfo(int shaderToCheck, IntBuffer iVal,
+ int length) {
+ ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
+ iVal.flip();
+ glGetInfoLogARB(shaderToCheck, iVal, infoLog);
+ byte[] infoBytes = new byte[length];
+ infoLog.get(infoBytes);
+ String out = new String(infoBytes);
+ System.out.println("Info log:\n"+out);
+ }
+
+}
View
94 .metadata/.plugins/org.eclipse.core.resources/.history/d/d0740e2bc18c00111abff6c8b064978b
@@ -0,0 +1,94 @@
+package lwjgltutorial.lessonTwo;
+
+import static org.lwjgl.opengl.ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCompileShaderARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCreateShaderObjectARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetInfoLogARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetObjectParameterARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glShaderSourceARB;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.opengl.ARBFragmentShader;
+import org.lwjgl.opengl.ARBVertexShader;
+
+public class ShaderUtilities {
+
+ private static boolean verboseValidityCheck=false;
+ private static final String SHADERS_ROOT_PATH="shaders";
+
+ public static int createFragmentShader(String pathToShaderFile) {
+ int fragmentShader=createShader(pathToShaderFile, ARBFragmentShader.GL_FRAGMENT_SHADER_ARB);
+ return fragmentShader;
+ }
+
+ public static int createVertexShader(String pathToShaderFile) {
+ int vertexShader=createShader(pathToShaderFile, ARBVertexShader.GL_VERTEX_SHADER_ARB);
+ return vertexShader;
+ }
+
+ public static int createShader(String shaderFileName, int shaderType) {
+ String shaderFilePath=SHADERS_ROOT_PATH+File.separator+shaderFileName;
+ int newShader=glCreateShaderObjectARB(shaderType);
+ if(newShader!=0) {
+ String shaderCode=readInShaderCodeFromShaderFile(shaderFilePath);
+ if(shaderCode!=null && !shaderCode.isEmpty()) {
+ glShaderSourceARB(newShader, shaderCode);
+ glCompileShaderARB(newShader);
+ if(isShaderValid(newShader)) {
+ return newShader;
+ }
+ }
+ }
+ //if anything fails, return 0 as error code
+ return 0;
+ }
+
+ private static String readInShaderCodeFromShaderFile(String pathToShaderFile) {
+ try {
+ BufferedReader bufferedReader=new BufferedReader(new FileReader(pathToShaderFile));
+ StringBuffer shaderCodeBuffer=new StringBuffer();
+ String codeLine=bufferedReader.readLine();
+ while(codeLine!=null) {
+ shaderCodeBuffer.append(codeLine+"\n");
+ codeLine=bufferedReader.readLine();
+ }
+ return shaderCodeBuffer.toString();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static boolean isShaderValid(int shaderToCheck) {
+// IntBuffer iVal = BufferUtils.createIntBuffer(1);
+// glGetObjectParameterARB(shaderToCheck, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);
+// int length = iVal.get();
+// boolean isValid = length>1;
+// if (isValid && verboseValidityCheck) {
+// printShaderLogInfo(shaderToCheck, iVal, length);
+// }
+//
+// return isValid;
+ return true;
+ }
+
+ private static void printShaderLogInfo(int shaderToCheck, IntBuffer iVal,
+ int length) {
+ ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
+ iVal.flip();
+ glGetInfoLogARB(shaderToCheck, iVal, infoLog);
+ byte[] infoBytes = new byte[length];
+ infoLog.get(infoBytes);
+ String out = new String(infoBytes);
+ System.out.println("Info log:\n"+out);
+ }
+
+}
View
94 .metadata/.plugins/org.eclipse.core.resources/.history/df/002db2d2bf8c00111abff6c8b064978b
@@ -0,0 +1,94 @@
+package lwjgltutorial.lessonTwo;
+
+import static org.lwjgl.opengl.ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCompileShaderARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCreateShaderObjectARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetInfoLogARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetObjectParameterARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glShaderSourceARB;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.opengl.ARBFragmentShader;
+import org.lwjgl.opengl.ARBVertexShader;
+
+public class ShaderUtilities {
+
+ private static boolean verboseValidityCheck=false;
+ private static final String SHADERS_ROOT_PATH="shaders";
+
+ public static int createFragmentShader(String pathToShaderFile) {
+ int fragmentShader=createShader(pathToShaderFile, ARBFragmentShader.GL_FRAGMENT_SHADER_ARB);
+ return fragmentShader;
+ }
+
+ public static int createVertexShader(String pathToShaderFile) {
+ int vertexShader=createShader(pathToShaderFile, ARBVertexShader.GL_VERTEX_SHADER_ARB);
+ return vertexShader;
+ }
+
+ public static int createShader(String shaderFileName, int shaderType) {
+ String shaderFilePath=SHADERS_ROOT_PATH+File.separator+shaderFileName;
+ int newShader=glCreateShaderObjectARB(shaderType);
+ if(newShader!=0) {
+ String shaderCode=readInShaderCodeFromShaderFile(shaderFilePath);
+ if(shaderCode!=null && !shaderCode.isEmpty()) {
+ glShaderSourceARB(newShader, shaderCode);
+ glCompileShaderARB(newShader);
+ if(isShaderValid(newShader)) {
+ return newShader;
+ }
+ }
+ }
+ //if anything fails, return 0 as error code
+ return 0;
+ }
+
+ private static String readInShaderCodeFromShaderFile(String pathToShaderFile) {
+ try {
+ BufferedReader bufferedReader=new BufferedReader(new FileReader(pathToShaderFile));
+ StringBuffer shaderCodeBuffer=new StringBuffer();
+ String codeLine=bufferedReader.readLine();
+ while(codeLine!=null) {
+ shaderCodeBuffer.append(codeLine+"\n");
+ codeLine=bufferedReader.readLine();
+ }
+ return shaderCodeBuffer.toString();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static boolean isShaderValid(int shaderToCheck) {
+ IntBuffer iVal = BufferUtils.createIntBuffer(1);
+ glGetObjectParameterARB(shaderToCheck, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);
+ int length = iVal.get();
+ boolean isValid = length>1;
+
+ if (isValid && verboseValidityCheck) {
+ printShaderLogInfo(shaderToCheck, iVal, length);
+ }
+
+ return isValid;
+ }
+
+ private static void printShaderLogInfo(int shaderToCheck, IntBuffer iVal,
+ int length) {
+ ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
+ iVal.flip();
+ glGetInfoLogARB(shaderToCheck, iVal, infoLog);
+ byte[] infoBytes = new byte[length];
+ infoLog.get(infoBytes);
+ String out = new String(infoBytes);
+ System.out.println("Info log:\n"+out);
+ }
+
+}
View
92 .metadata/.plugins/org.eclipse.core.resources/.history/f3/80942cb5c18c00111abff6c8b064978b
@@ -0,0 +1,92 @@
+package lwjgltutorial.lessonTwo;
+
+import static org.lwjgl.opengl.ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCompileShaderARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glCreateShaderObjectARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetInfoLogARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glGetObjectParameterARB;
+import static org.lwjgl.opengl.ARBShaderObjects.glShaderSourceARB;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.opengl.ARBFragmentShader;
+import org.lwjgl.opengl.ARBVertexShader;
+
+public class ShaderUtilities {
+
+ private static boolean verboseValidityCheck=false;
+ private static final String SHADERS_ROOT_PATH="shaders";
+
+ public static int createFragmentShader(String pathToShaderFile) {
+ int fragmentShader=createShader(pathToShaderFile, ARBFragmentShader.GL_FRAGMENT_SHADER_ARB);
+ return fragmentShader;
+ }
+
+ public static int createVertexShader(String pathToShaderFile) {
+ int vertexShader=createShader(pathToShaderFile, ARBVertexShader.GL_VERTEX_SHADER_ARB);
+ return vertexShader;
+ }
+
+ public static int createShader(String shaderFileName, int shaderType) {
+ String shaderFilePath=SHADERS_ROOT_PATH+File.separator+shaderFileName;
+ int newShader=glCreateShaderObjectARB(shaderType);
+ if(newShader!=0) {
+ String shaderCode=readInShaderCodeFromShaderFile(shaderFilePath);
+ if(shaderCode!=null && !shaderCode.isEmpty()) {
+ glShaderSourceARB(newShader, shaderCode);
+ glCompileShaderARB(newShader);
+ if(isShaderValid(newShader)) {
+ return newShader;
+ }
+ }
+ }
+ //if anything fails, return 0 as error code
+ return 0;
+ }
+
+ private static String readInShaderCodeFromShaderFile(String pathToShaderFile) {
+ try {
+ BufferedReader bufferedReader=new BufferedReader(new FileReader(pathToShaderFile));
+ StringBuffer shaderCodeBuffer=new StringBuffer();
+ String codeLine=bufferedReader.readLine();
+ while(codeLine!=null) {
+ shaderCodeBuffer.append(codeLine+"\n");
+ codeLine=bufferedReader.readLine();
+ }
+ return shaderCodeBuffer.toString();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static boolean isShaderValid(int shaderToCheck) {
+ IntBuffer iVal = BufferUtils.createIntBuffer(1);
+ glGetObjectParameterARB(shaderToCheck, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);
+ int length = iVal.get();
+ boolean isValid = length>1;
+ if (isValid && verboseValidityCheck) {
+ printShaderLogInfo(shaderToCheck, iVal, length);
+ }
+ return true;
+ }
+
+ private static void printShaderLogInfo(int shaderToCheck, IntBuffer iVal,
+ int length) {
+ ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
+ iVal.flip();
+ glGetInfoLogARB(shaderToCheck, iVal, infoLog);
+ byte[] infoBytes = new byte[length];
+ infoLog.get(infoBytes);
+ String out = new String(infoBytes);
+ System.out.println("Info log:\n"+out);
+ }
+
+}
View
BIN ...adata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.indexes/7/2e/history.index
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.indexes/history.index
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.markers
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.markers.snap
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonOne/.syncinfo.snap
Binary file not shown.
View
BIN ...ta/.plugins/org.eclipse.core.resources/.projects/LessonOne/org.eclipse.jdt.core/state.dat
Binary file not shown.
View
BIN ...data/.plugins/org.eclipse.core.resources/.projects/LessonTwo/.indexes/3e/f4/history.index
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonTwo/.markers
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/LessonTwo/.markers.snap
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/libs/.markers.snap
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/libs/.syncinfo.snap
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.projects/libs/org.eclipse.jdt.core/state.dat
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.root/1.tree
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.root/2.tree
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.core.resources/.snap
Binary file not shown.
View
3 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ant.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+useAnnotationsPrefPage=true
+useQuickDiffPrefPage=true
View
2 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs
@@ -1,2 +1,2 @@
eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_VM_XML=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1335103976918">\r\n<vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\r\n<vm id\="1335103976918" name\="jre6" path\="C\:\\Program Files\\Java\\jre6"/>\r\n</vmType>\r\n</vmSettings>\r\n
+org.eclipse.jdt.launching.PREF_VM_XML=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1335103976918" defaultVMConnector\="">\r\n<vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\r\n<vm id\="1335103976918" name\="jre6" path\="C\:\\Program Files\\Java\\jre6"/>\r\n</vmType>\r\n</vmSettings>\r\n
View
2 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
@@ -1,3 +1,5 @@
+content_assist_disabled_computers=org.eclipse.jdt.ui.javaAllProposalCategory\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\u0000org.eclipse.jdt.ui.textProposalCategory\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\u0000
+content_assist_lru_history=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><history maxLHS\="100" maxRHS\="10"/>
content_assist_number_of_computers=16
content_assist_proposals_background=255,255,255
content_assist_proposals_foreground=0,0,0
View
2 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.java.ui.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.mylyn.java.ui.run.count.3_1_0=1
View
1 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
@@ -1,2 +1,3 @@
+ENABLE_ANIMATIONS=false
eclipse.preferences.version=1
showIntro=false
View
2 .metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml
@@ -5,7 +5,7 @@
<item value=", org.eclipse.jdt.launching.localJavaApplication, " key="org.eclipse.debug.ui.EXPANDED_NODES"/>
<item value="702" key="DIALOG_HEIGHT"/>
<item value="237" key="org.eclipse.debug.ui.DIALOG_SASH_WEIGHTS_1"/>
- <item value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/>
<item value="762" key="org.eclipse.debug.ui.DIALOG_SASH_WEIGHTS_2"/>
+ <item value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/>
</section>
</section>
View
2 .metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml
@@ -10,12 +10,14 @@
</launchGroup>
<launchGroup id="org.eclipse.debug.ui.launchGroup.debug">
<mruHistory>
+<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;LessonTwo&quot;/&gt;&#13;&#10;"/>
<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;LessonOne&quot;/&gt;&#13;&#10;"/>
</mruHistory>
<favorites/>
</launchGroup>
<launchGroup id="org.eclipse.debug.ui.launchGroup.run">
<mruHistory>
+<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;LessonTwo&quot;/&gt;&#13;&#10;"/>
<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;LessonOne&quot;/&gt;&#13;&#10;"/>
</mruHistory>
<favorites/>
View
2 .metadata/.plugins/org.eclipse.e4.workbench/deltas.xml
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN .metadata/.plugins/org.eclipse.jdt.core/2791608477.index
Binary file not shown.
View
BIN .metadata/.plugins/org.eclipse.jdt.core/3452083210.index
Binary file not shown.
View
13 .metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt
@@ -1,4 +1,15 @@
INDEX VERSION 1.126+C:\Users\ali\Dropbox\work\lwjglTutorial\.metadata\.plugins\org.eclipse.jdt.core
-3452083210.index
+4251467834.index
2481996896.index
+3585733931.index
+2877109961.index
+2382864401.index
+3452083210.index
+4088397835.index
+1195944079.index
+3270002986.index
2791608477.index
+3730526690.index
+3000053649.index
+3277441100.index
+1789169078.index
View
BIN .metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
Binary file not shown.
View
4 .metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml
@@ -2,12 +2,12 @@
<section name="Workbench">
<section name="org.eclipse.jdt.debug.ui.MAIN_METHOD_SELECTION_DIALOG">
<item value="true" key="ShowStatusLine"/>
- <item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;History&gt;&#x0D;&#x0A;&lt;historyRootNode&gt;&#x0D;&#x0A;&lt;infoNode&gt;=LessonOne/src&amp;lt;lwjglTutorial.lessonOne{LessonOne.java[LessonOne&lt;/infoNode&gt;&#x0D;&#x0A;&lt;/historyRootNode&gt;&#x0D;&#x0A;&lt;/History&gt;" key="History"/>
+ <item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;History&gt;&#x0D;&#x0A;&lt;historyRootNode&gt;&#x0D;&#x0A;&lt;infoNode&gt;=LessonOne/src&amp;lt;lwjglTutorial.lessonOne{LessonOne.java[LessonOne&lt;/infoNode&gt;&#x0D;&#x0A;&lt;infoNode&gt;=LessonTwo/&amp;lt;lwjgltutorial.lessonTwo{Main.java[Main&lt;/infoNode&gt;&#x0D;&#x0A;&lt;/historyRootNode&gt;&#x0D;&#x0A;&lt;/History&gt;" key="History"/>
<section name="DialogBoundsSettings">
<item value="600" key="DIALOG_WIDTH"/>
<item value="18" key="DIALOG_Y_ORIGIN"/>
- <item value="122" key="DIALOG_X_ORIGIN"/>
<item value="500" key="DIALOG_HEIGHT"/>
+ <item value="122" key="DIALOG_X_ORIGIN"/>
<item value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/>
</section>
</section>
View
12 .metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
@@ -13,7 +13,17 @@
<section name="JavaElementSearchActions">
</section>
<section name="BuildPathsPropertyPage">
- <item value="2" key="pageIndex"/>
+ <item value="0" key="pageIndex"/>
+ </section>
+ <section name="RefactoringWizard.preview">
+ <item value="400" key="height"/>
+ <item value="600" key="width"/>
+ </section>
+ <section name="org.eclipse.ltk.ui.refactoring.settings">
+ <item value="*" key="patterns"/>
+ <item value="false" key="updateQualifiedNames"/>
+ <item value="false" key="renameSubpackages"/>
+ <item value="false" key="updateTextualMatches"/>
</section>
<section name="quick_assist_proposal_size">
</section>
View
BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN .metadata/.plugins/org.eclipse.jdt.ui/jdt-images/4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2 ...s/org.eclipse.ltk.core.refactoring/.refactorings/LessonOne/2012/4/16/refactorings.history
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
-<session version="1.0">&#x0A;<refactoring accessors="true" comment="Delete element from project &apos;LessonOne&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Original element: &apos;make.mf&apos;" description="Delete element" element1="make.mf" elements="0" flags="589830" id="org.eclipse.jdt.ui.delete" resources="1" stamp="1335103998172" subPackages="false" version="1.0"/>&#x0A;<refactoring comment="Move 3 elements to &apos;LessonOne/src&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Destination element: &apos;LessonOne/src&apos;&#x0D;&#x0A;- Original elements:&#x0D;&#x0A; Ex1ShaderSquare.java&#x0D;&#x0A; LessonOne.java&#x0D;&#x0A; ShaderTriangle.java&#x0D;&#x0A;- Update references to refactored element" description="Move files" destination="/src" element1="Ex1ShaderSquare.java" element2="LessonOne.java" element3="ShaderTriangle.java" files="3" flags="589830" folders="0" id="org.eclipse.jdt.ui.move" policy="org.eclipse.jdt.ui.moveResources" qualified="false" references="true" stamp="1335104006202" units="0" version="1.0"/>&#x0A;<refactoring comment="Move 3 elements to &apos;LessonOne/src/lwjglTutorial.lessonOne&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Destination element: &apos;LessonOne/src/lwjglTutorial.lessonOne&apos;&#x0D;&#x0A;- Original elements:&#x0D;&#x0A; LessonOne.java&#x0D;&#x0A; Ex1ShaderSquare.java&#x0D;&#x0A; ShaderTriangle.java&#x0D;&#x0A;- Update references to refactored element" description="Move compilation units" destination="/src&lt;lwjglTutorial.lessonOne" element1="/src&lt;{LessonOne.java" element2="/src&lt;{Ex1ShaderSquare.java" element3="/src&lt;{ShaderTriangle.java" files="0" flags="589830" folders="0" id="org.eclipse.jdt.ui.move" log="/src&lt;&#x09;/src&lt;lwjglTutorial.lessonOne" policy="org.eclipse.jdt.ui.moveResources" qualified="false" references="true" stamp="1335104036787" units="3" version="1.0"/>&#x0A;<refactoring accessors="true" comment="Delete element from project &apos;LessonOne&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Original element: &apos;lwjglTutorial.lessonOne.Ex1ShaderSquare.java&apos;" description="Delete element" element1="/src&lt;lwjglTutorial.lessonOne{Ex1ShaderSquare.java" elements="1" flags="589830" id="org.eclipse.jdt.ui.delete" resources="0" stamp="1335104281785" subPackages="false" version="1.0"/>
+<session version="1.0">&#x0A;<refactoring accessors="true" comment="Delete element from project &apos;LessonOne&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Original element: &apos;make.mf&apos;" description="Delete element" element1="make.mf" elements="0" flags="589830" id="org.eclipse.jdt.ui.delete" resources="1" stamp="1335103998172" subPackages="false" version="1.0"/>&#x0A;<refactoring comment="Move 3 elements to &apos;LessonOne/src&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Destination element: &apos;LessonOne/src&apos;&#x0D;&#x0A;- Original elements:&#x0D;&#x0A; Ex1ShaderSquare.java&#x0D;&#x0A; LessonOne.java&#x0D;&#x0A; ShaderTriangle.java&#x0D;&#x0A;- Update references to refactored element" description="Move files" destination="/src" element1="Ex1ShaderSquare.java" element2="LessonOne.java" element3="ShaderTriangle.java" files="3" flags="589830" folders="0" id="org.eclipse.jdt.ui.move" policy="org.eclipse.jdt.ui.moveResources" qualified="false" references="true" stamp="1335104006202" units="0" version="1.0"/>&#x0A;<refactoring comment="Move 3 elements to &apos;LessonOne/src/lwjglTutorial.lessonOne&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Destination element: &apos;LessonOne/src/lwjglTutorial.lessonOne&apos;&#x0D;&#x0A;- Original elements:&#x0D;&#x0A; LessonOne.java&#x0D;&#x0A; Ex1ShaderSquare.java&#x0D;&#x0A; ShaderTriangle.java&#x0D;&#x0A;- Update references to refactored element" description="Move compilation units" destination="/src&lt;lwjglTutorial.lessonOne" element1="/src&lt;{LessonOne.java" element2="/src&lt;{Ex1ShaderSquare.java" element3="/src&lt;{ShaderTriangle.java" files="0" flags="589830" folders="0" id="org.eclipse.jdt.ui.move" log="/src&lt;&#x09;/src&lt;lwjglTutorial.lessonOne" policy="org.eclipse.jdt.ui.moveResources" qualified="false" references="true" stamp="1335104036787" units="3" version="1.0"/>&#x0A;<refactoring accessors="true" comment="Delete element from project &apos;LessonOne&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Original element: &apos;lwjglTutorial.lessonOne.Ex1ShaderSquare.java&apos;" description="Delete element" element1="/src&lt;lwjglTutorial.lessonOne{Ex1ShaderSquare.java" elements="1" flags="589830" id="org.eclipse.jdt.ui.delete" resources="0" stamp="1335104281785" subPackages="false" version="1.0"/>&#x0A;<refactoring accessors="true" comment="Delete element from project &apos;LessonOne&apos;&#x0D;&#x0A;- Original project: &apos;LessonOne&apos;&#x0D;&#x0A;- Original element: &apos;build.xml&apos;" description="Delete element" element1="build.xml" elements="0" flags="589830" id="org.eclipse.jdt.ui.delete" resources="1" stamp="1335106043369" subPackages="false" version="1.0"/>
</session>
View
1 ...ins/org.eclipse.ltk.core.refactoring/.refactorings/LessonOne/2012/4/16/refactorings.index
@@ -2,3 +2,4 @@
1335104006202 Move files
1335104036787 Move compilation units
1335104281785 Delete element
+1335106043369 Delete element
View
5 .metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section name="Workbench">
+ <section name="quick_assist_proposal_size">
+ </section>
+</section>
View
10 .metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
@@ -12,4 +12,14 @@
<list key="textEntries">
</list>
</section>
+ <section name="WorkbenchPreferenceDialogSettings">
+ <item value="158" key="DIALOG_Y_ORIGIN"/>
+ <item value="632" key="DIALOG_X_ORIGIN"/>
+ </section>
+ <section name="ImportExportAction">
+ <item value="org.eclipse.ant.ui.export" key="ImportExportPage.STORE_SELECTED_EXPORT_WIZARD_ID"/>
+ <list key="ImportExportPage.STORE_EXPANDED_EXPORT_CATEGORIES">
+ <item value="org.eclipse.ui.Basic"/>
+ </list>
+ </section>
</section>
View
1 .metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
@@ -2,4 +2,5 @@
<workingSetManager>
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1335103885651_0" label="Window Working Set" name="Aggregate for window 1335103885650"/>
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1335104942720_1" label="Window Working Set" name="Aggregate for window 1335104942720"/>
+<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1335128917483_2" label="Window Working Set" name="Aggregate for window 1335128917483"/>
</workingSetManager>
View
1 LessonTwo/lwjgltutorial/lessonTwo/ShaderUtilities.java
@@ -72,7 +72,6 @@ public static boolean isShaderValid(int shaderToCheck) {
glGetObjectParameterARB(shaderToCheck, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);
int length = iVal.get();
boolean isValid = length>1;
-
if (isValid && verboseValidityCheck) {
printShaderLogInfo(shaderToCheck, iVal, length);
}

0 comments on commit a5f42bd

Please sign in to comment.