1. Roi Atalla
  2. OpenGL Utils

Commits

Roi Atalla  committed 1bbd903

Everything so far. Successfully implemented instancing for cubes and bullets.

  • Participants
  • Parent commits 37e8156
  • Branches default

Comments (0)

Files changed (5)

File src/com/ra4king/opengl/util/PNGDecoder.java

View file
 	 * </p>
 	 * 
 	 * @param r
-	 *            the red component of the color to make transparent
+	 *        the red component of the color to make transparent
 	 * @param g
-	 *            the green component of the color to make transparent
+	 *        the green component of the color to make transparent
 	 * @param b
-	 *            the blue component of the color to make transparent
+	 *        the blue component of the color to make transparent
 	 * @throws UnsupportedOperationException
-	 *             if the tRNS chunk data can't be set
+	 *         if the tRNS chunk data can't be set
 	 * @see #hasAlphaChannel()
 	 */
 	public void overwriteTRNS(byte r, byte g, byte b) {
 	 * Computes the implemented format conversion for the desired format.
 	 * 
 	 * @param fmt
-	 *            the desired format
+	 *        the desired format
 	 * @return format which best matches the desired format
 	 * @throws UnsupportedOperationException
-	 *             if this PNG file can't be decoded
+	 *         if this PNG file can't be decoded
 	 */
 	public Format decideTextureFormat(Format fmt) {
 		switch(colorType) {
 	 * the last line.
 	 * 
 	 * @param buffer
-	 *            the buffer
+	 *        the buffer
 	 * @param stride
-	 *            the stride in bytes from start of a line to start of the next line, can be negative.
+	 *        the stride in bytes from start of a line to start of the next line, can be negative.
 	 * @param fmt
-	 *            the target format into which the image should be decoded.
+	 *        the target format into which the image should be decoded.
 	 * @throws IOException
-	 *             if a read or data error occurred
+	 *         if a read or data error occurred
 	 * @throws IllegalArgumentException
-	 *             if the start position of a line falls outside the buffer
+	 *         if the start position of a line falls outside the buffer
 	 * @throws UnsupportedOperationException
-	 *             if the image can't be decoded into the desired format
+	 *         if the image can't be decoded into the desired format
 	 */
 	public void decode(ByteBuffer buffer, int stride, Format fmt) throws IOException {
 		final int offset = buffer.position();
 	 * the first line.
 	 * 
 	 * @param buffer
-	 *            the buffer
+	 *        the buffer
 	 * @param stride
-	 *            the stride in bytes from start of a line to start of the next line, must be positive.
+	 *        the stride in bytes from start of a line to start of the next line, must be positive.
 	 * @param fmt
-	 *            the target format into which the image should be decoded.
+	 *        the target format into which the image should be decoded.
 	 * @throws IOException
-	 *             if a read or data error occurred
+	 *         if a read or data error occurred
 	 * @throws IllegalArgumentException
-	 *             if the start position of a line falls outside the buffer
+	 *         if the start position of a line falls outside the buffer
 	 * @throws UnsupportedOperationException
-	 *             if the image can't be decoded into the desired format
+	 *         if the image can't be decoded into the desired format
 	 */
 	public void decodeFlipped(ByteBuffer buffer, int stride, Format fmt) throws IOException {
 		if(stride <= 0) {

File src/com/ra4king/opengl/util/Utils.java

View file
 		}).translate(eye.copy().mult(-1));
 	}
 	
-	public static void updateMousePoles(ViewPole... viewPoles) {
+	public static void updateMousePoles(ViewPole ... viewPoles) {
 		updateMousePoles(viewPoles, null);
 	}
 	
-	public static void updateMousePoles(ObjectPole... objectPoles) {
+	public static void updateMousePoles(ObjectPole ... objectPoles) {
 		updateMousePoles(null, objectPoles);
 	}
 	

File src/com/ra4king/opengl/util/scene/binders/StateBinder.java

View file
 }
 
 abstract class UniformBinderBase implements StateBinder {
-	private HashMap<ShaderProgram, Integer> programUniformLocation = new HashMap<>();
+	private HashMap<ShaderProgram,Integer> programUniformLocation = new HashMap<>();
 	
 	public void associateWithProgram(ShaderProgram program, String uniform) {
 		programUniformLocation.put(program, glGetUniformLocation(program.getProgram(), uniform));

File src/com/ra4king/opengl/util/scene/binders/TextureBinder.java

View file
 import static org.lwjgl.opengl.GL13.*;
 import static org.lwjgl.opengl.GL33.*;
 
-import org.lwjgl.opengl.NVVertexBufferUnifiedMemory;
-
 import com.ra4king.opengl.util.ShaderProgram;
 
 public class TextureBinder implements StateBinder {

File src/com/ra4king/opengl/util/scene/binders/UniformFloatBinder.java

View file
 
 import com.ra4king.opengl.util.ShaderProgram;
 
-public class UniformFloatBinder extends UniformBinderBase{
+public class UniformFloatBinder extends UniformBinderBase {
 	private float value;
 	
 	public UniformFloatBinder() {}