summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-02-16 06:39:52 +0100
committerSven Gothel <[email protected]>2015-02-16 06:39:52 +0100
commit42d88f99cfa62304943a7b37700653e627b13e61 (patch)
treec1556ac4b8ce5a6dd3325a15766b0375d722d52e /src
parent70faf070f50ea66fd4cc8f5f586614810f378787 (diff)
Fix typo: PixelFormat.Composition.[componenCount() -> componentCount()]
.. thx to Julien Gouesse's review.
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java2
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormat.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormatUtil.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPixelFormatUtil00NEWT.java8
5 files changed, 15 insertions, 15 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
index c2067a9f2..cc3462f99 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
@@ -176,7 +176,7 @@ public class GLReadBufferUtil {
final int reqCompCount = hasAlpha ? 4 : 3;
final PixelFormat.Composition hostPixelComp = pixelBufferProvider.getHostPixelComp(gl.getGLProfile(), reqCompCount);
final GLPixelAttributes pixelAttribs = pixelBufferProvider.getAttributes(gl, reqCompCount, true);
- final int componentCount = pixelAttribs.pfmt.comp.componenCount();
+ final int componentCount = pixelAttribs.pfmt.comp.componentCount();
hasAlpha = 0 <= pixelAttribs.pfmt.comp.find(PixelFormat.CType.A);
final int alignment = 4 == componentCount ? 4 : 1 ;
final int internalFormat = 4 == componentCount ? GL.GL_RGBA : GL.GL_RGB;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java
index 6b0b3784d..d2f89cb9b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java
@@ -235,7 +235,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
if( null == hostPixComp ) {
throw new IllegalArgumentException("Null hostPixComp");
}
- final int awtFormat = getAWTFormat(gl.getGLProfile(), hostPixComp.componenCount());
+ final int awtFormat = getAWTFormat(gl.getGLProfile(), hostPixComp.componentCount());
final BufferedImage image = new BufferedImage(width, height, awtFormat);
final int[] readBackIntBuffer = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
final Buffer ibuffer = IntBuffer.wrap( readBackIntBuffer );
@@ -291,7 +291,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
r.dispose();
}
r = allocateImpl(hostPixComp, pixelAttributes, pack,
- getAWTFormat(gl.getGLProfile(), hostPixComp.componenCount()), width, height, depth, minByteSize);
+ getAWTFormat(gl.getGLProfile(), hostPixComp.componentCount()), width, height, depth, minByteSize);
bufferMap.put(bufferKey, r);
}
return r;
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormat.java b/src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormat.java
index 8b1e91564..748e14f0d 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormat.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormat.java
@@ -425,7 +425,7 @@ public enum PixelFormat {
boolean isInterleaved();
/** Number of components per pixel, e.g. 3 for {@link PixelFormat#RGBx8888 RGBx8888}. */
- int componenCount();
+ int componentCount();
/** Number of bits per pixel, e.g. 24 bits for {@link PixelFormat#RGBx8888 RGBx8888}. */
int bitsPerPixel();
/**
@@ -602,7 +602,7 @@ public enum PixelFormat {
@Override
public final boolean isInterleaved() { return true; }
@Override
- public final int componenCount() { return compMask.length; }
+ public final int componentCount() { return compMask.length; }
@Override
public final int bitsPerPixel() { return bitsPerPixel; }
@Override
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormatUtil.java b/src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormatUtil.java
index 180f02d72..42f6ccb8a 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormatUtil.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/util/PixelFormatUtil.java
@@ -46,12 +46,12 @@ public class PixelFormatUtil {
public static class ComponentMap {
/**
* Contains the source index for each destination index,
- * length is {@link Composition#componenCount()} of destination.
+ * length is {@link Composition#componentCount()} of destination.
*/
final int[] dst2src;
/**
* Contains the destination index for each source index,
- * length is {@link Composition#componenCount()} of source.
+ * length is {@link Composition#componentCount()} of source.
*/
final int[] src2dst;
@@ -62,8 +62,8 @@ public class PixelFormatUtil {
final boolean hasSrcRGB;
public ComponentMap(final PixelFormat.Composition src, final PixelFormat.Composition dst) {
- final int sCompCount = src.componenCount();
- final int dCompCount = dst.componenCount();
+ final int sCompCount = src.componentCount();
+ final int dCompCount = dst.componentCount();
final PixelFormat.CType[] sCompOrder = src.componentOrder();
final PixelFormat.CType[] dCompOrder = dst.componentOrder();
@@ -513,8 +513,8 @@ public class PixelFormatUtil {
final Bitstream<ByteBuffer> dstBitStream,
final PixelFormat.Composition srcComp,
final Bitstream<ByteBuffer> srcBitStream) throws IllegalStateException, IOException {
- final int sCompCount = srcComp.componenCount();
- final int dCompCount = dstComp.componenCount();
+ final int sCompCount = srcComp.componentCount();
+ final int dCompCount = dstComp.componentCount();
final int[] sc = new int[sCompCount];
final int[] dcDef = new int[dCompCount];
final int[] srcCompBitCount = srcComp.componentBitCount();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPixelFormatUtil00NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPixelFormatUtil00NEWT.java
index 16158a0f0..d822f237d 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPixelFormatUtil00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPixelFormatUtil00NEWT.java
@@ -237,7 +237,7 @@ public class TestPixelFormatUtil00NEWT extends UITestCase {
* Note: Fixes bit-rounding errors, i.e. RGBA5551: A 0.6f -> 0x01 -> 1f ... -> RGBA8888: A 0xff
*/
static final float sourceNorm(final PixelFormat.Composition srcComp, final int sIdx, final float f) {
- if( sIdx >= 0 && sIdx < srcComp.componenCount() ) {
+ if( sIdx >= 0 && sIdx < srcComp.componentCount() ) {
return srcComp.toFloat(srcComp.fromFloat(f, sIdx, false), sIdx, false);
} else {
return 0f;
@@ -245,7 +245,7 @@ public class TestPixelFormatUtil00NEWT extends UITestCase {
}
static final byte rescaleComp(final PixelFormat.Composition srcComp, final int sIdx,
final PixelFormat.Composition dstComp, final int dIdx, final float f) {
- if( dIdx >= 0 && dIdx < dstComp.componenCount() ) {
+ if( dIdx >= 0 && dIdx < dstComp.componentCount() ) {
return (byte)dstComp.fromFloat(sourceNorm(srcComp, sIdx, f), dIdx, false);
} else {
return (byte)0;
@@ -543,7 +543,7 @@ public class TestPixelFormatUtil00NEWT extends UITestCase {
if( PixelFormat.LUMINANCE != srcFmt && PixelFormat.LUMINANCE == destFmt ) {
// Cannot convert: RGB* -> LUM -> RGB*
System.err.println("CONVERT["+i+"]["+j+"]: Conv2: Dropped due to RGB* -> LUM");
- } else if( srcFmt.comp.componenCount() > destFmt.comp.componenCount() ) {
+ } else if( srcFmt.comp.componentCount() > destFmt.comp.componentCount() ) {
// Cannot convert back if: src.componentCount > dest.componentCount
System.err.println("CONVERT["+i+"]["+j+"]: Conv2: Dropped due to src.componentCount > dest.componentCount");
} else {
@@ -632,7 +632,7 @@ public class TestPixelFormatUtil00NEWT extends UITestCase {
final PixelFormat.Composition imgComp = image.getPixelformat().comp;
final ByteBuffer bb = image.getPixels();
final int bytesPerPixel = imgComp.bytesPerPixel();
- final int compCount = imgComp.componenCount();
+ final int compCount = imgComp.componentCount();
final int[] compBitCount = imgComp.componentBitCount();
final int srcPixOffset = y * image.getStride()+x*bytesPerPixel;