aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLImageFormat.java
diff options
context:
space:
mode:
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.