summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLImageFormat.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-06-25 00:18:16 +0200
committerMichael Bien <[email protected]>2010-06-25 00:18:16 +0200
commitb6d6f75129cac5f4719d1cbfb3c0b63159086137 (patch)
treecc1780cba01108e6044e39a85832cf0df63de9d7 /src/com/jogamp/opencl/CLImageFormat.java
parent735c9cbbec16457358eee7424a0533fcc1b8c64c (diff)
added CLContext.getSupportedImageFormats() methods and unit test.
Diffstat (limited to 'src/com/jogamp/opencl/CLImageFormat.java')
-rw-r--r--src/com/jogamp/opencl/CLImageFormat.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/jogamp/opencl/CLImageFormat.java b/src/com/jogamp/opencl/CLImageFormat.java
index 20f2c4b1..e3eb3667 100644
--- a/src/com/jogamp/opencl/CLImageFormat.java
+++ b/src/com/jogamp/opencl/CLImageFormat.java
@@ -5,17 +5,23 @@ import com.jogamp.opencl.impl.CLImageFormatImpl;
import static com.jogamp.opencl.CL.*;
/**
- *
+ * Represents the OpenCL image format with its channeltype and order.
* @author Michael Bien
*/
public final class CLImageFormat {
- private final CLImageFormatImpl format = CLImageFormatImpl.create();
+ private final CLImageFormatImpl format;
CLImageFormat() {
+ format = CLImageFormatImpl.create();
+ }
+
+ CLImageFormat(CLImageFormatImpl format) {
+ this.format = format;
}
public CLImageFormat(ChannelOrder order, ChannelType type) {
+ format = CLImageFormatImpl.create();
setImageChannelOrder(order);
setImageChannelDataType(type);
}
@@ -45,6 +51,11 @@ public final class CLImageFormat {
return format;
}
+ @Override
+ public String toString() {
+ return "CLImageFormat["+getImageChannelOrder()+" "+getImageChannelDataType()+"]";
+ }
+
/**
* Specifies the number of channels and the channel layout i.e. the memory
* layout in which channels are stored in the image.