Permalink
Browse files

Formatting tweaks.

  • Loading branch information...
samskivert committed Mar 10, 2015
1 parent f29f2b5 commit f64305eb33d71f6426ceda2bb02920f710623122
Showing with 12 additions and 36 deletions.
  1. +6 −18 core/src/playn/core/gl/GL20Program.java
  2. +6 −18 ios/src/playn/ios/IOSGLProgram.java
@@ -73,9 +73,7 @@ public GL20Program(GLContext ctx, GL20 gl, String vertexSource, String fragmentS
return (loc < 0) ? null : new GLShader.Uniform1f() {
private float aCached = 0;
public void bind(float a) {
if(aCached == a) {
return;
}
if (aCached == a) return;
aCached = a;
gl.glUniform1f(loc, a);
}
@@ -87,9 +85,7 @@ public void bind(float a) {
return (loc < 0) ? null : new GLShader.Uniform2f() {
private float aCached = 0, bCached = 0;
public void bind(float a, float b) {
if(aCached == a && bCached == b) {
return;
}
if (aCached == a && bCached == b) return;
aCached = a;
bCached = b;
gl.glUniform2f(loc, a, b);
@@ -102,9 +98,7 @@ public void bind(float a, float b) {
return (loc < 0) ? null : new GLShader.Uniform3f() {
private float aCached = 0, bCached = 0, cCached = 0;
public void bind(float a, float b, float c) {
if(aCached == a && bCached == b && cCached == c) {
return;
}
if (aCached == a && bCached == b && cCached == c) return;
aCached = a;
bCached = b;
cCached = c;
@@ -118,9 +112,7 @@ public void bind(float a, float b, float c) {
return (loc < 0) ? null : new GLShader.Uniform4f() {
private float aCached = 0, bCached = 0, cCached = 0, dCached = 0;
public void bind(float a, float b, float c, float d) {
if(aCached == a && bCached == b && cCached == c && dCached == d) {
return;
}
if (aCached == a && bCached == b && cCached == c && dCached == d) return;
aCached = a;
bCached = b;
cCached = c;
@@ -136,9 +128,7 @@ public void bind(float a, float b, float c, float d) {
return (loc < 0) ? null : new GLShader.Uniform1i() {
private int aCached = 0;
public void bind(int a) {
if(aCached == a) {
return;
}
if (aCached == a) return;
aCached = a;
gl.glUniform1i(loc, a);
}
@@ -150,9 +140,7 @@ public void bind(int a) {
return (loc < 0) ? null : new GLShader.Uniform2i() {
private int aCached = 0, bCached = 0;
public void bind(int a, int b) {
if(aCached == a && bCached == b) {
return;
}
if (aCached == a && bCached == b) return;
aCached = a;
bCached = b;
gl.glUniform2i(loc, a, b);
@@ -79,9 +79,7 @@ public IOSGLProgram(IOSGLContext ctx, String vertexSource, String fragmentSource
return (loc < 0) ? null : new GLShader.Uniform1f() {
private float aCached = 0;
public void bind(float a) {
if(aCached == a) {
return;
}
if (aCached == a) return;
aCached = a;
GL.Uniform1(loc, a);
}
@@ -93,9 +91,7 @@ public void bind(float a) {
return (loc < 0) ? null : new GLShader.Uniform2f() {
private float aCached = 0, bCached = 0;
public void bind(float a, float b) {
if(aCached == a && bCached == b) {
return;
}
if (aCached == a && bCached == b) return;
aCached = a;
bCached = b;
GL.Uniform2(loc, a, b);
@@ -108,9 +104,7 @@ public void bind(float a, float b) {
return (loc < 0) ? null : new GLShader.Uniform3f() {
private float aCached = 0, bCached = 0, cCached = 0;
public void bind(float a, float b, float c) {
if(aCached == a && bCached == b && cCached == c) {
return;
}
if (aCached == a && bCached == b && cCached == c) return;
aCached = a;
bCached = b;
cCached = c;
@@ -124,9 +118,7 @@ public void bind(float a, float b, float c) {
return (loc < 0) ? null : new GLShader.Uniform4f() {
private float aCached = 0, bCached = 0, cCached = 0, dCached = 0;
public void bind(float a, float b, float c, float d) {
if(aCached == a && bCached == b && cCached == c && dCached == d) {
return;
}
if (aCached == a && bCached == b && cCached == c && dCached == d) return;
aCached = a;
bCached = b;
cCached = c;
@@ -141,9 +133,7 @@ public void bind(float a, float b, float c, float d) {
return (loc < 0) ? null : new GLShader.Uniform1i() {
private int aCached = 0;
public void bind(int a) {
if(aCached == a) {
return;
}
if (aCached == a) return;
aCached = a;
GL.Uniform1(loc, a);
}
@@ -155,9 +145,7 @@ public void bind(int a) {
return (loc < 0) ? null : new GLShader.Uniform2i() {
private int aCached = 0, bCached = 0;
public void bind(int a, int b) {
if(aCached == a && bCached == b) {
return;
}
if (aCached == a && bCached == b) return;
aCached = a;
bCached = b;
GL.Uniform2(loc, a, b);

0 comments on commit f64305e

Please sign in to comment.