Roi Atalla avatar Roi Atalla committed ed3cd58

Fixed some issues in code and general reformat.

Comments (0)

Files changed (7)

src/com/ra4king/opengl/arcsynthesis/gl33/chapter14/example3/Example14_3.java

 	private static enum ShaderMode {
 		MODE_FIXED, MODE_TEXTURED, MODE_TEXTURED_COMPUTE;
 		
-		static {
-			length = values().length;
-		}
-		
-		private static int length;
-		
-		public static int length() {
-			return length;
-		}
+		private static int length = values().length;
 	}
 	
 	private static class ShaderPair {

src/com/ra4king/opengl/arcsynthesis/gl33/chapter16/example3/Example16_3.java

 import org.lwjgl.input.Keyboard;
 import org.lwjgl.opengl.PixelFormat;
 
+import rosick.jglsdk.glimg.DdsLoader;
+import rosick.jglsdk.glimg.ImageSet;
+import rosick.jglsdk.glimg.ImageSet.Dimensions;
+import rosick.jglsdk.glimg.ImageSet.SingleImage;
+import rosick.jglsdk.glimg.TextureGenerator;
+import rosick.jglsdk.glimg.TextureGenerator.OpenGLPixelTransferParams;
+
 import com.ra4king.opengl.GLProgram;
 import com.ra4king.opengl.arcsynthesis.gl33.chapter16.example3.LightEnv.LightBlock;
 import com.ra4king.opengl.util.Mesh;
 import com.ra4king.opengl.util.math.Vector3;
 import com.ra4king.opengl.util.math.Vector4;
 
-import rosick.jglsdk.glimg.DdsLoader;
-import rosick.jglsdk.glimg.ImageSet;
-import rosick.jglsdk.glimg.ImageSet.Dimensions;
-import rosick.jglsdk.glimg.ImageSet.SingleImage;
-import rosick.jglsdk.glimg.TextureGenerator;
-import rosick.jglsdk.glimg.TextureGenerator.OpenGLPixelTransferParams;
-
 /**
  * @author ra4king
  */

src/com/ra4king/opengl/arcsynthesis/gl33/chapter17/example2/Example17_2.java

 import org.lwjgl.input.Keyboard;
 import org.xmlpull.v1.XmlPullParserException;
 
+import rosick.jglsdk.glimg.DdsLoader;
+import rosick.jglsdk.glimg.ImageSet;
+import rosick.jglsdk.glimg.TextureGenerator;
+
 import com.ra4king.opengl.GLProgram;
 import com.ra4king.opengl.util.Mesh;
 import com.ra4king.opengl.util.MousePoles.MouseButton;
 import com.ra4king.opengl.util.scene.binders.UniformMat4Binder;
 import com.ra4king.opengl.util.scene.binders.UniformVec3Binder;
 
-import rosick.jglsdk.glimg.DdsLoader;
-import rosick.jglsdk.glimg.ImageSet;
-import rosick.jglsdk.glimg.TextureGenerator;
-
 /**
  * @author ra4king
  */

src/com/ra4king/opengl/arcsynthesis/gl33/chapter17/example3/Example17_3.java

 import org.lwjgl.input.Keyboard;
 import org.xmlpull.v1.XmlPullParserException;
 
+import rosick.jglsdk.glimg.DdsLoader;
+import rosick.jglsdk.glimg.ImageSet;
+import rosick.jglsdk.glimg.ImageSet.Dimensions;
+import rosick.jglsdk.glimg.TextureGenerator;
+
 import com.ra4king.opengl.GLProgram;
 import com.ra4king.opengl.util.Mesh;
 import com.ra4king.opengl.util.MousePoles.MouseButton;
 import com.ra4king.opengl.util.scene.binders.UniformMat4Binder;
 import com.ra4king.opengl.util.scene.binders.UniformVec3Binder;
 
-import rosick.jglsdk.glimg.DdsLoader;
-import rosick.jglsdk.glimg.ImageSet;
-import rosick.jglsdk.glimg.ImageSet.Dimensions;
-import rosick.jglsdk.glimg.TextureGenerator;
-
 /**
  * @author ra4king
  */

src/com/ra4king/opengl/util/Mesh.java

 		for(String s : data)
 			if(!(s = s.trim()).isEmpty())
 				clean.add(s);
-		return clean.toArray(new String[0]);
+		return clean.toArray(new String[clean.size()]);
 	}
 	
 	public void render() {

src/com/ra4king/opengl/util/StringUtil.java

 			input = input.substring(index + 1);
 		}
 		parts.add(input);
-		return parts.toArray(new String[0]);
+		return parts.toArray(new String[parts.size()]);
 	}
 }

src/com/ra4king/opengl/util/scene/Scene.java

 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlPullParserFactory;
 
+import rosick.jglsdk.glimg.DdsLoader;
+import rosick.jglsdk.glimg.ImageSet;
+import rosick.jglsdk.glimg.TextureGenerator;
+import rosick.jglsdk.glimg.TextureGenerator.ForcedConvertFlags;
+
 import com.ra4king.opengl.util.Mesh;
 import com.ra4king.opengl.util.ShaderProgram;
 import com.ra4king.opengl.util.Utils;
 import com.ra4king.opengl.util.scene.Scene.SceneNode.Variant;
 import com.ra4king.opengl.util.scene.binders.StateBinder;
 
-import rosick.jglsdk.glimg.DdsLoader;
-import rosick.jglsdk.glimg.ImageSet;
-import rosick.jglsdk.glimg.TextureGenerator;
-import rosick.jglsdk.glimg.TextureGenerator.ForcedConvertFlags;
-
 /**
  * @author ra4king
  */
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.