aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-04 06:45:29 +0200
committerSven Gothel <[email protected]>2023-09-04 06:45:29 +0200
commite06d1d07125fb9489ea45d05fb40a562e2c4ca46 (patch)
treefc090c1dd6ae0d1e7a2dbb7be2dd7d2da458be77 /src/demos/com/jogamp
parentba1c13b4eb4db2f15d2ee72d768748ab1f5d5639 (diff)
FloatUtil.abs(a): Mark as deprecated, use Math.abs(a) directly. We assume it is an intrinsic + branch-less implementation
Expected implementation is - return Float.intBitsToFloat(Float.floatToRawIntBits(a) & 0x7fffffff); replacing old implementation - return (a <= 0.0F) ? 0.0F - a : a; .. also market as @IntrinsicCandidate Hence we shall leave it to the JRE core-lib implementation...
Diffstat (limited to 'src/demos/com/jogamp')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
index 134892622..cc918c9fe 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
@@ -344,7 +344,7 @@ public class UIShapeDemo01 implements GLEventListener {
}
public void printScreen(final GLAutoDrawable drawable, final String dir, final String tech, final String objName, final boolean exportAlpha) throws GLException, IOException {
- final String sw = String.format("-%03dx%03d-Z%04d-T%04d-%s", drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), (int)FloatUtil.abs(zTran), 0, objName);
+ final String sw = String.format("-%03dx%03d-Z%04d-T%04d-%s", drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), (int)Math.abs(zTran), 0, objName);
final String filename = dir + tech + sw +".png";
if(screenshot.readPixels(drawable.getGL(), false)) {
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
index 6af975e7c..ecd7b1ccf 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
@@ -413,7 +413,7 @@ public class UITypeDemo01 implements GLEventListener {
final String tech="demo-"+Region.getRenderModeString(renderModes);
final String objName = "snap"+screenshot_num;
{
- final String sw = String.format("-%03dx%03d-Z%04d-T%04d-%s", drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), (int)FloatUtil.abs(zTran), 0, objName);
+ final String sw = String.format("-%03dx%03d-Z%04d-T%04d-%s", drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), (int)Math.abs(zTran), 0, objName);
final String filename = dir + tech + sw +".png";
if(screenshot.readPixels(drawable.getGL(), false)) {