io.qt.gui.rhi.QRhiTexture Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui.rhi;
import io.qt.*;
/**
* Texture resource
* Java wrapper for Qt class QRhiTexture
*/
public abstract class QRhiTexture extends io.qt.gui.rhi.QRhiResource
{
@NativeAccess
private static final class ConcreteWrapper extends QRhiTexture {
@NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
@QtUninvokable
public boolean create(){
return create_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean create_native(long __this__nativeId);
@Override
@QtUninvokable
public void destroy(){
destroy_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void destroy_native(long __this__nativeId);
}
/**
* Java wrapper for Qt enum QRhiTexture::Flag
*
* @see Flags
*/
public enum Flag implements QtFlagEnumerator {
/**
* Representing QRhiTexture:: RenderTarget
*/
RenderTarget(1),
/**
* Representing QRhiTexture:: CubeMap
*/
CubeMap(4),
/**
* Representing QRhiTexture:: MipMapped
*/
MipMapped(8),
/**
* Representing QRhiTexture:: sRGB
*/
sRGB(16),
/**
* Representing QRhiTexture:: UsedAsTransferSource
*/
UsedAsTransferSource(32),
/**
* Representing QRhiTexture:: UsedWithGenerateMips
*/
UsedWithGenerateMips(64),
/**
* Representing QRhiTexture:: UsedWithLoadStore
*/
UsedWithLoadStore(128),
/**
* Representing QRhiTexture:: UsedAsCompressedAtlas
*/
UsedAsCompressedAtlas(256),
/**
* Representing QRhiTexture:: ExternalOES
*/
ExternalOES(512),
/**
* Representing QRhiTexture:: ThreeDimensional
*/
ThreeDimensional(1024),
/**
* Representing QRhiTexture:: TextureRectangleGL
*/
TextureRectangleGL(2048),
/**
* Representing QRhiTexture:: TextureArray
*/
TextureArray(4096),
/**
* Representing QRhiTexture:: OneDimensional
*/
OneDimensional(8192);
static {
QtJambi_LibraryUtilities.initialize();
}
private Flag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull Flags asFlags() {
return new Flags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull Flags combined(@NonNull Flag e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull Flags cleared(@NonNull Flag e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link Flags} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull Flags flags(@Nullable Flag @NonNull... values) {
return new Flags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Flag resolve(int value) {
switch (value) {
case 1: return RenderTarget;
case 4: return CubeMap;
case 8: return MipMapped;
case 16: return sRGB;
case 32: return UsedAsTransferSource;
case 64: return UsedWithGenerateMips;
case 128: return UsedWithLoadStore;
case 256: return UsedAsCompressedAtlas;
case 512: return ExternalOES;
case 1024: return ThreeDimensional;
case 2048: return TextureRectangleGL;
case 4096: return TextureArray;
case 8192: return OneDimensional;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link Flag}
*/
public static final class Flags extends QFlags implements Comparable {
private static final long serialVersionUID = 0x92d9bce6c929c1c6L;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new Flags where the flags in args
are set.
* @param args enum entries
*/
public Flags(@Nullable Flag @NonNull... args){
super(args);
}
/**
* Creates a new Flags with given value
.
* @param value
*/
public Flags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new Flags
*/
@Override
public final @NonNull Flags combined(@StrictNonNull Flag e){
return new Flags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull Flags setFlag(@Nullable Flag e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final @NonNull Flags setFlag(@Nullable Flag e, boolean on){
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
return this;
}
/**
* Returns an array of flag objects represented by this Flags.
* @return array of enum entries
*/
@Override
public final @NonNull Flag @NonNull[] flags(){
return super.flags(Flag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull Flags clone(){
return new Flags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull Flags other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QRhiTexture::Format
*/
public enum Format implements QtEnumerator {
/**
* Representing QRhiTexture:: UnknownFormat
*/
UnknownFormat(0),
/**
* Representing QRhiTexture:: RGBA8
*/
RGBA8(1),
/**
* Representing QRhiTexture:: BGRA8
*/
BGRA8(2),
/**
* Representing QRhiTexture:: R8
*/
R8(3),
/**
* Representing QRhiTexture:: RG8
*/
RG8(4),
/**
* Representing QRhiTexture:: R16
*/
R16(5),
/**
* Representing QRhiTexture:: RG16
*/
RG16(6),
/**
* Representing QRhiTexture:: RED_OR_ALPHA8
*/
RED_OR_ALPHA8(7),
/**
* Representing QRhiTexture:: RGBA16F
*/
RGBA16F(8),
/**
* Representing QRhiTexture:: RGBA32F
*/
RGBA32F(9),
/**
* Representing QRhiTexture:: R16F
*/
R16F(10),
/**
* Representing QRhiTexture:: R32F
*/
R32F(11),
/**
* Representing QRhiTexture:: RGB10A2
*/
RGB10A2(12),
/**
* Representing QRhiTexture:: D16
*/
D16(13),
/**
* Representing QRhiTexture:: D24
*/
D24(14),
/**
* Representing QRhiTexture:: D24S8
*/
D24S8(15),
/**
* Representing QRhiTexture:: D32F
*/
D32F(16),
/**
* Representing QRhiTexture:: BC1
*/
BC1(17),
/**
* Representing QRhiTexture:: BC2
*/
BC2(18),
/**
* Representing QRhiTexture:: BC3
*/
BC3(19),
/**
* Representing QRhiTexture:: BC4
*/
BC4(20),
/**
* Representing QRhiTexture:: BC5
*/
BC5(21),
/**
* Representing QRhiTexture:: BC6H
*/
BC6H(22),
/**
* Representing QRhiTexture:: BC7
*/
BC7(23),
/**
* Representing QRhiTexture:: ETC2_RGB8
*/
ETC2_RGB8(24),
/**
* Representing QRhiTexture:: ETC2_RGB8A1
*/
ETC2_RGB8A1(25),
/**
* Representing QRhiTexture:: ETC2_RGBA8
*/
ETC2_RGBA8(26),
/**
* Representing QRhiTexture:: ASTC_4x4
*/
ASTC_4x4(27),
/**
* Representing QRhiTexture:: ASTC_5x4
*/
ASTC_5x4(28),
/**
* Representing QRhiTexture:: ASTC_5x5
*/
ASTC_5x5(29),
/**
* Representing QRhiTexture:: ASTC_6x5
*/
ASTC_6x5(30),
/**
* Representing QRhiTexture:: ASTC_6x6
*/
ASTC_6x6(31),
/**
* Representing QRhiTexture:: ASTC_8x5
*/
ASTC_8x5(32),
/**
* Representing QRhiTexture:: ASTC_8x6
*/
ASTC_8x6(33),
/**
* Representing QRhiTexture:: ASTC_8x8
*/
ASTC_8x8(34),
/**
* Representing QRhiTexture:: ASTC_10x5
*/
ASTC_10x5(35),
/**
* Representing QRhiTexture:: ASTC_10x6
*/
ASTC_10x6(36),
/**
* Representing QRhiTexture:: ASTC_10x8
*/
ASTC_10x8(37),
/**
* Representing QRhiTexture:: ASTC_10x10
*/
ASTC_10x10(38),
/**
* Representing QRhiTexture:: ASTC_12x10
*/
ASTC_12x10(39),
/**
* Representing QRhiTexture:: ASTC_12x12
*/
ASTC_12x12(40);
static {
QtJambi_LibraryUtilities.initialize();
}
private Format(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Format resolve(int value) {
switch (value) {
case 0: return UnknownFormat;
case 1: return RGBA8;
case 2: return BGRA8;
case 3: return R8;
case 4: return RG8;
case 5: return R16;
case 6: return RG16;
case 7: return RED_OR_ALPHA8;
case 8: return RGBA16F;
case 9: return RGBA32F;
case 10: return R16F;
case 11: return R32F;
case 12: return RGB10A2;
case 13: return D16;
case 14: return D24;
case 15: return D24S8;
case 16: return D32F;
case 17: return BC1;
case 18: return BC2;
case 19: return BC3;
case 20: return BC4;
case 21: return BC5;
case 22: return BC6H;
case 23: return BC7;
case 24: return ETC2_RGB8;
case 25: return ETC2_RGB8A1;
case 26: return ETC2_RGBA8;
case 27: return ASTC_4x4;
case 28: return ASTC_5x4;
case 29: return ASTC_5x5;
case 30: return ASTC_6x5;
case 31: return ASTC_6x6;
case 32: return ASTC_8x5;
case 33: return ASTC_8x6;
case 34: return ASTC_8x8;
case 35: return ASTC_10x5;
case 36: return ASTC_10x6;
case 37: return ASTC_10x8;
case 38: return ASTC_10x10;
case 39: return ASTC_12x10;
case 40: return ASTC_12x12;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Contains information about the underlying native resources of a texture
* Java wrapper for Qt class QRhiTexture::NativeTexture
*/
public static class NativeTexture extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QRhiTexture::NativeTexture:: NativeTexture()
*/
public NativeTexture(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(NativeTexture instance);
/**
* See QRhiTexture::NativeTexture:: NativeTexture(QRhiTexture::NativeTexture)
*/
public NativeTexture(io.qt.gui.rhi.QRhiTexture.@StrictNonNull NativeTexture other){
super((QPrivateConstructor)null);
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
initialize_native(this, other);
}
private native static void initialize_native(NativeTexture instance, io.qt.gui.rhi.QRhiTexture.NativeTexture other);
/**
* See QRhiTexture::NativeTexture:: NativeTexture{quint64, int}
*/
public NativeTexture(long object, int layout){
super((QPrivateConstructor)null);
initialize_native(this, object, layout);
}
private native static void initialize_native(NativeTexture instance, long object, int layout);
/**
* Specifies the current image layout for APIs like Vulkan
* See QRhiTexture::NativeTexture:: layout
*/
@QtUninvokable
public final void setLayout(int layout){
setLayout_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), layout);
}
@QtUninvokable
private native void setLayout_native_int(long __this__nativeId, int layout);
/**
* Specifies the current image layout for APIs like Vulkan
* See QRhiTexture::NativeTexture:: layout
*/
@QtUninvokable
public final int layout(){
return layout_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int layout_native(long __this__nativeId);
/**
* 64-bit integer containing the native object handle
* See QRhiTexture::NativeTexture:: object
*/
@QtUninvokable
public final void setObject(long object){
setObject_native_quint64(QtJambi_LibraryUtilities.internal.nativeId(this), object);
}
@QtUninvokable
private native void setObject_native_quint64(long __this__nativeId, long object);
/**
* 64-bit integer containing the native object handle
* See QRhiTexture::NativeTexture:: object
*/
@QtUninvokable
public final long object(){
return object_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native long object_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected NativeTexture(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QRhiTexture::NativeTexture:: NativeTexture(QRhiTexture::NativeTexture)
*/
@QtUninvokable
@Override
public NativeTexture clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native NativeTexture clone_native(long __this_nativeId);
/**
* @hidden
* Kotlin property getter. In Java use {@link #layout()} instead.
*/
@QtUninvokable
public final int getLayout() {
return layout();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #object()} instead.
*/
@QtUninvokable
public final long getObject() {
return object();
}
}
/**
* See QRhiTexture:: arrayRangeLength()const
*/
@QtUninvokable
public final int arrayRangeLength(){
return arrayRangeLength_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int arrayRangeLength_native_constfct(long __this__nativeId);
/**
* See QRhiTexture:: arrayRangeStart()const
*/
@QtUninvokable
public final int arrayRangeStart(){
return arrayRangeStart_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int arrayRangeStart_native_constfct(long __this__nativeId);
/**
* See QRhiTexture:: arraySize()const
*/
@QtUninvokable
public final int arraySize(){
return arraySize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int arraySize_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int depth(){
return depth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int depth_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.gui.rhi.QRhiTexture.@NonNull Flags flags(){
return new io.qt.gui.rhi.QRhiTexture.Flags(flags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int flags_native_constfct(long __this__nativeId);
/**
* See QRhiTexture:: format()const
*/
@QtUninvokable
public final io.qt.gui.rhi.QRhiTexture.@NonNull Format format(){
return io.qt.gui.rhi.QRhiTexture.Format.resolve(format_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int format_native_constfct(long __this__nativeId);
/**
* See QRhiTexture:: pixelSize()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QSize pixelSize(){
return pixelSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize pixelSize_native_constfct(long __this__nativeId);
/**
* See QRhiTexture:: sampleCount()const
*/
@QtUninvokable
public final int sampleCount(){
return sampleCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int sampleCount_native_constfct(long __this__nativeId);
/**
* See QRhiTexture:: setArrayRange(int, int)
*/
@QtUninvokable
public final void setArrayRange(int startIndex, int count){
setArrayRange_native_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), startIndex, count);
}
@QtUninvokable
private native void setArrayRange_native_int_int(long __this__nativeId, int startIndex, int count);
/**
* See QRhiTexture:: setArraySize(int)
*/
@QtUninvokable
public final void setArraySize(int arraySize){
setArraySize_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), arraySize);
}
@QtUninvokable
private native void setArraySize_native_int(long __this__nativeId, int arraySize);
/**
* See QRhiTexture:: setDepth(int)
*/
@QtUninvokable
public final void setDepth(int depth){
setDepth_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), depth);
}
@QtUninvokable
private native void setDepth_native_int(long __this__nativeId, int depth);
/**
* See QRhiTexture:: setFlags(QRhiTexture::Flags)
*/
@QtUninvokable
public final void setFlags(io.qt.gui.rhi.QRhiTexture.@NonNull Flags f){
setFlags_native_QRhiTexture_Flags(QtJambi_LibraryUtilities.internal.nativeId(this), f.value());
}
@QtUninvokable
private native void setFlags_native_QRhiTexture_Flags(long __this__nativeId, int f);
/**
* See QRhiTexture:: setFormat(QRhiTexture::Format)
*/
@QtUninvokable
public final void setFormat(io.qt.gui.rhi.QRhiTexture.@NonNull Format fmt){
setFormat_native_QRhiTexture_Format(QtJambi_LibraryUtilities.internal.nativeId(this), fmt.value());
}
@QtUninvokable
private native void setFormat_native_QRhiTexture_Format(long __this__nativeId, int fmt);
/**
* See QRhiTexture:: setPixelSize(QSize)
*/
@QtUninvokable
public final void setPixelSize(io.qt.core.@NonNull QSize sz){
setPixelSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sz));
}
@QtUninvokable
private native void setPixelSize_native_cref_QSize(long __this__nativeId, long sz);
/**
* See QRhiTexture:: setSampleCount(int)
*/
@QtUninvokable
public final void setSampleCount(int s){
setSampleCount_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), s);
}
@QtUninvokable
private native void setSampleCount_native_int(long __this__nativeId, int s);
/**
*
*/
@QtUninvokable
public abstract boolean create();
@QtUninvokable
private native boolean create_native(long __this__nativeId);
/**
* See QRhiTexture:: createFrom(QRhiTexture::NativeTexture)
*/
@QtUninvokable
public boolean createFrom(io.qt.gui.rhi.QRhiTexture.@NonNull NativeTexture src){
return createFrom_native_QRhiTexture_NativeTexture(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(src));
}
@QtUninvokable
private native boolean createFrom_native_QRhiTexture_NativeTexture(long __this__nativeId, long src);
/**
* See QRhiTexture:: nativeTexture()
*/
@QtUninvokable
public io.qt.gui.rhi.QRhiTexture.@NonNull NativeTexture nativeTexture(){
return nativeTexture_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.rhi.QRhiTexture.NativeTexture nativeTexture_native(long __this__nativeId);
/**
* See QRhiResource:: resourceType()const
*/
@QtUninvokable
@Override
public io.qt.gui.rhi.QRhiResource.@NonNull Type resourceType(){
return io.qt.gui.rhi.QRhiResource.Type.resolve(resourceType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int resourceType_native_constfct(long __this__nativeId);
/**
* See QRhiTexture:: setNativeLayout(int)
*/
@QtUninvokable
public void setNativeLayout(int layout){
setNativeLayout_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), layout);
}
@QtUninvokable
private native void setNativeLayout_native_int(long __this__nativeId, int layout);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QRhiTexture(QPrivateConstructor p) { super(p); }
/**
* Overloaded function for {@link #setFlags(io.qt.gui.rhi.QRhiTexture.Flags)}.
*/
@QtUninvokable
public final void setFlags(io.qt.gui.rhi.QRhiTexture.@NonNull Flag @NonNull... f) {
setFlags(new io.qt.gui.rhi.QRhiTexture.Flags(f));
}
}