diff --git a/core/src/processing/opengl/FontTexture.java b/core/src/processing/opengl/FontTexture.java index af28ad9f3..bec0ab098 100644 --- a/core/src/processing/opengl/FontTexture.java +++ b/core/src/processing/opengl/FontTexture.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -104,7 +104,7 @@ class FontTexture implements PConstants { offsetY = 0; lineHeight = 0; - texinfoMap = new HashMap(); + texinfoMap = new HashMap<>(); glyphTexinfos = new TextureInfo[font.getGlyphCount()]; addAllGlyphsToTexture(pg, font); } diff --git a/core/src/processing/opengl/FrameBuffer.java b/core/src/processing/opengl/FrameBuffer.java index e2992be68..a5426c52d 100644 --- a/core/src/processing/opengl/FrameBuffer.java +++ b/core/src/processing/opengl/FrameBuffer.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index a87d248fe..610576a5c 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/PGraphics2D.java b/core/src/processing/opengl/PGraphics2D.java index 8fbdd5eff..fc9dd7af7 100644 --- a/core/src/processing/opengl/PGraphics2D.java +++ b/core/src/processing/opengl/PGraphics2D.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/PGraphics3D.java b/core/src/processing/opengl/PGraphics3D.java index 50b18b167..5a5e1c3b3 100644 --- a/core/src/processing/opengl/PGraphics3D.java +++ b/core/src/processing/opengl/PGraphics3D.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 1d241f64c..f70f2ab9b 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/PJOGL.java b/core/src/processing/opengl/PJOGL.java index debe59665..33c8a3113 100644 --- a/core/src/processing/opengl/PJOGL.java +++ b/core/src/processing/opengl/PJOGL.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/PShader.java b/core/src/processing/opengl/PShader.java index 2009cb886..e5174dbed 100644 --- a/core/src/processing/opengl/PShader.java +++ b/core/src/processing/opengl/PShader.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -386,7 +386,7 @@ public class PShader implements PConstants { } /** - * Sets the uniform variables inside the shader to modify the effect while the + * Sets the uniform variables inside the shader to modify the effect while the * program is running. * * @webref rendering:shaders @@ -743,7 +743,7 @@ public class PShader implements PConstants { protected void setUniformImpl(String name, int type, Object value) { if (uniformValues == null) { - uniformValues = new HashMap(); + uniformValues = new HashMap<>(); } uniformValues.put(name, new UniformValue(type, value)); } @@ -833,10 +833,10 @@ public class PShader implements PConstants { PImage img = (PImage)val.value; Texture tex = currentPG.getTexture(img); - if (textures == null) textures = new HashMap(); + if (textures == null) textures = new HashMap<>(); textures.put(loc, tex); - if (texUnits == null) texUnits = new HashMap(); + if (texUnits == null) texUnits = new HashMap<>(); if (texUnits.containsKey(loc)) { unit = texUnits.get(loc); pgl.uniform1i(loc, unit); diff --git a/core/src/processing/opengl/PShapeOpenGL.java b/core/src/processing/opengl/PShapeOpenGL.java index 0c985dbe7..08a0d618d 100644 --- a/core/src/processing/opengl/PShapeOpenGL.java +++ b/core/src/processing/opengl/PShapeOpenGL.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/PSurfaceJOGL.java b/core/src/processing/opengl/PSurfaceJOGL.java index 70473327d..90d36043b 100644 --- a/core/src/processing/opengl/PSurfaceJOGL.java +++ b/core/src/processing/opengl/PSurfaceJOGL.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-20 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/Texture.java b/core/src/processing/opengl/Texture.java index b6bf7d2bf..ecb67681b 100644 --- a/core/src/processing/opengl/Texture.java +++ b/core/src/processing/opengl/Texture.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -815,7 +815,7 @@ public class Texture implements PConstants { public void copyBufferFromSource(Object natRef, ByteBuffer byteBuf, int w, int h) { if (bufferCache == null) { - bufferCache = new LinkedList(); + bufferCache = new LinkedList<>(); } if (bufferCache.size() + 1 <= MAX_BUFFER_CACHE_SIZE) { @@ -872,7 +872,7 @@ public class Texture implements PConstants { // renderer draws the texture, and hence put the pixels put of sync, we // simply empty the cache. if (usedBuffers == null) { - usedBuffers = new LinkedList(); + usedBuffers = new LinkedList<>(); } while (0 < bufferCache.size()) { data = bufferCache.remove(0); @@ -911,7 +911,7 @@ public class Texture implements PConstants { // Putting the buffer in the used buffers list to dispose at the end of // draw. if (usedBuffers == null) { - usedBuffers = new LinkedList(); + usedBuffers = new LinkedList<>(); } usedBuffers.add(data); diff --git a/core/src/processing/opengl/VertexBuffer.java b/core/src/processing/opengl/VertexBuffer.java index 3be09a3d2..3d20479b4 100644 --- a/core/src/processing/opengl/VertexBuffer.java +++ b/core/src/processing/opengl/VertexBuffer.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/shaders/ColorFrag.glsl b/core/src/processing/opengl/shaders/ColorFrag.glsl index 59adfdad3..1a9c1f6f3 100644 --- a/core/src/processing/opengl/shaders/ColorFrag.glsl +++ b/core/src/processing/opengl/shaders/ColorFrag.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/shaders/ColorVert.glsl b/core/src/processing/opengl/shaders/ColorVert.glsl index 6e8820c22..aaab987c0 100644 --- a/core/src/processing/opengl/shaders/ColorVert.glsl +++ b/core/src/processing/opengl/shaders/ColorVert.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -31,4 +31,4 @@ void main() { gl_Position = transformMatrix * position; vertColor = color; -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/LightFrag.glsl b/core/src/processing/opengl/shaders/LightFrag.glsl index b9cd44726..4f775befa 100644 --- a/core/src/processing/opengl/shaders/LightFrag.glsl +++ b/core/src/processing/opengl/shaders/LightFrag.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -30,4 +30,4 @@ varying vec4 backVertColor; void main() { gl_FragColor = gl_FrontFacing ? vertColor : backVertColor; -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/LightVert-brcm.glsl b/core/src/processing/opengl/shaders/LightVert-brcm.glsl index b96caa4b3..f518ef90a 100644 --- a/core/src/processing/opengl/shaders/LightVert-brcm.glsl +++ b/core/src/processing/opengl/shaders/LightVert-brcm.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -151,4 +151,4 @@ void main() { vec4(totalBackDiffuse, 1) * color + vec4(totalBackSpecular, 0) * specular + vec4(emissive.rgb, 0); -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/LightVert-vc4.glsl b/core/src/processing/opengl/shaders/LightVert-vc4.glsl index ba7972676..b3dee92c9 100644 --- a/core/src/processing/opengl/shaders/LightVert-vc4.glsl +++ b/core/src/processing/opengl/shaders/LightVert-vc4.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -151,4 +151,4 @@ void main() { vec4(totalBackDiffuse, 1) * color + vec4(totalBackSpecular, 0) * specular + vec4(emissive.rgb, 0); -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/LightVert.glsl b/core/src/processing/opengl/shaders/LightVert.glsl index 470fd4b23..409e481e6 100644 --- a/core/src/processing/opengl/shaders/LightVert.glsl +++ b/core/src/processing/opengl/shaders/LightVert.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -148,4 +148,4 @@ void main() { vec4(totalBackDiffuse, 1) * color + vec4(totalBackSpecular, 0) * specular + vec4(emissive.rgb, 0); -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/LineFrag.glsl b/core/src/processing/opengl/shaders/LineFrag.glsl index 09fffcb85..7e4997251 100644 --- a/core/src/processing/opengl/shaders/LineFrag.glsl +++ b/core/src/processing/opengl/shaders/LineFrag.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -29,4 +29,4 @@ varying vec4 vertColor; void main() { gl_FragColor = vertColor; -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/LineVert.glsl b/core/src/processing/opengl/shaders/LineVert.glsl index 50946ba5a..3ae4e9923 100644 --- a/core/src/processing/opengl/shaders/LineVert.glsl +++ b/core/src/processing/opengl/shaders/LineVert.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/shaders/MaskFrag.glsl b/core/src/processing/opengl/shaders/MaskFrag.glsl index 74fad83a9..1b3e09a61 100644 --- a/core/src/processing/opengl/shaders/MaskFrag.glsl +++ b/core/src/processing/opengl/shaders/MaskFrag.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -37,4 +37,4 @@ void main() { vec3 maskColor = texture2D(mask, vertTexCoord.st).rgb; float luminance = dot(maskColor, vec3(0.2126, 0.7152, 0.0722)); gl_FragColor = vec4(texColor, luminance); -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/PointFrag.glsl b/core/src/processing/opengl/shaders/PointFrag.glsl index 59adfdad3..e00c49e7a 100644 --- a/core/src/processing/opengl/shaders/PointFrag.glsl +++ b/core/src/processing/opengl/shaders/PointFrag.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -29,4 +29,4 @@ varying vec4 vertColor; void main() { gl_FragColor = vertColor; -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/PointVert.glsl b/core/src/processing/opengl/shaders/PointVert.glsl index 8249e9076..32fc0122c 100644 --- a/core/src/processing/opengl/shaders/PointVert.glsl +++ b/core/src/processing/opengl/shaders/PointVert.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/shaders/TexFrag.glsl b/core/src/processing/opengl/shaders/TexFrag.glsl index 5e236ee91..ef54c3641 100644 --- a/core/src/processing/opengl/shaders/TexFrag.glsl +++ b/core/src/processing/opengl/shaders/TexFrag.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -34,4 +34,4 @@ varying vec4 vertTexCoord; void main() { gl_FragColor = texture2D(texture, vertTexCoord.st) * vertColor; -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/TexLightFrag.glsl b/core/src/processing/opengl/shaders/TexLightFrag.glsl index 1e9cc7e19..f30d28b93 100644 --- a/core/src/processing/opengl/shaders/TexLightFrag.glsl +++ b/core/src/processing/opengl/shaders/TexLightFrag.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -34,4 +34,4 @@ varying vec4 vertTexCoord; void main() { gl_FragColor = texture2D(texture, vertTexCoord.st) * (gl_FrontFacing ? vertColor : backVertColor); -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/shaders/TexLightVert-brcm.glsl b/core/src/processing/opengl/shaders/TexLightVert-brcm.glsl index 51e88ab05..24d6711f1 100644 --- a/core/src/processing/opengl/shaders/TexLightVert-brcm.glsl +++ b/core/src/processing/opengl/shaders/TexLightVert-brcm.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/shaders/TexLightVert-vc4.glsl b/core/src/processing/opengl/shaders/TexLightVert-vc4.glsl index f54277e81..be81952e4 100644 --- a/core/src/processing/opengl/shaders/TexLightVert-vc4.glsl +++ b/core/src/processing/opengl/shaders/TexLightVert-vc4.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/shaders/TexLightVert.glsl b/core/src/processing/opengl/shaders/TexLightVert.glsl index 6ef7d4bb7..17ed9cb6d 100644 --- a/core/src/processing/opengl/shaders/TexLightVert.glsl +++ b/core/src/processing/opengl/shaders/TexLightVert.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology diff --git a/core/src/processing/opengl/shaders/TexVert.glsl b/core/src/processing/opengl/shaders/TexVert.glsl index 3bc62e32f..6c5280fc1 100644 --- a/core/src/processing/opengl/shaders/TexVert.glsl +++ b/core/src/processing/opengl/shaders/TexVert.glsl @@ -1,7 +1,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2012-15 The Processing Foundation + Copyright (c) 2012-21 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -35,4 +35,4 @@ void main() { vertColor = color; vertTexCoord = texMatrix * vec4(texCoord, 1.0, 1.0); -} \ No newline at end of file +}