io.qt.gui.rhi.QRhiTextureRenderTarget Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui.rhi;
import io.qt.*;
/**
* Texture render target resource
* Java wrapper for Qt class QRhiTextureRenderTarget
* This class was introduced in Qt 6.6.
*/
public abstract class QRhiTextureRenderTarget extends io.qt.gui.rhi.QRhiRenderTarget
{
@NativeAccess
private static final class ConcreteWrapper extends QRhiTextureRenderTarget {
@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);
@Override
@QtUninvokable
public float devicePixelRatio(){
return devicePixelRatio_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native float devicePixelRatio_native_constfct(long __this__nativeId);
@Override
@QtUninvokable
public io.qt.gui.rhi.@Nullable QRhiRenderPassDescriptor newCompatibleRenderPassDescriptor(){
return newCompatibleRenderPassDescriptor_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.rhi.QRhiRenderPassDescriptor newCompatibleRenderPassDescriptor_native(long __this__nativeId);
@Override
@QtUninvokable
public 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);
@Override
@QtUninvokable
public int sampleCount(){
return sampleCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int sampleCount_native_constfct(long __this__nativeId);
}
/**
* Java wrapper for Qt enum QRhiTextureRenderTarget::Flag
*
* @see Flags
*/
public enum Flag implements QtFlagEnumerator {
/**
* Representing QRhiTextureRenderTarget:: PreserveColorContents
*/
PreserveColorContents(1),
/**
* Representing QRhiTextureRenderTarget:: PreserveDepthStencilContents
*/
PreserveDepthStencilContents(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private Flag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
@Override
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 PreserveColorContents;
case 2: return PreserveDepthStencilContents;
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
*/
@Override
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
*/
@Override
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());
}
}
/**
* See QRhiTextureRenderTarget:: description()const
*/
@QtUninvokable
public final io.qt.gui.rhi.@NonNull QRhiTextureRenderTargetDescription description(){
return description_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.rhi.QRhiTextureRenderTargetDescription description_native_constfct(long __this__nativeId);
/**
* See QRhiTextureRenderTarget:: flags()const
*/
@QtUninvokable
public final io.qt.gui.rhi.QRhiTextureRenderTarget.@NonNull Flags flags(){
return new io.qt.gui.rhi.QRhiTextureRenderTarget.Flags(flags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int flags_native_constfct(long __this__nativeId);
/**
* See QRhiTextureRenderTarget:: setDescription(QRhiTextureRenderTargetDescription)
*/
@QtUninvokable
public final void setDescription(io.qt.gui.rhi.@StrictNonNull QRhiTextureRenderTargetDescription desc){
java.util.Objects.requireNonNull(desc, "Argument 'desc': null not expected.");
setDescription_native_cref_QRhiTextureRenderTargetDescription(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(desc));
}
@QtUninvokable
private native void setDescription_native_cref_QRhiTextureRenderTargetDescription(long __this__nativeId, long desc);
/**
* See QRhiTextureRenderTarget:: setFlags(QRhiTextureRenderTarget::Flags)
*/
@QtUninvokable
public final void setFlags(io.qt.gui.rhi.QRhiTextureRenderTarget.@NonNull Flags f){
setFlags_native_QRhiTextureRenderTarget_Flags(QtJambi_LibraryUtilities.internal.nativeId(this), f.value());
}
@QtUninvokable
private native void setFlags_native_QRhiTextureRenderTarget_Flags(long __this__nativeId, int f);
/**
* See QRhiTextureRenderTarget:: create()
*/
@QtUninvokable
public abstract boolean create();
@QtUninvokable
private native boolean create_native(long __this__nativeId);
/**
* See QRhiTextureRenderTarget:: newCompatibleRenderPassDescriptor()
*/
@QtUninvokable
public abstract io.qt.gui.rhi.@Nullable QRhiRenderPassDescriptor newCompatibleRenderPassDescriptor();
@QtUninvokable
private native io.qt.gui.rhi.QRhiRenderPassDescriptor newCompatibleRenderPassDescriptor_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);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QRhiTextureRenderTarget(QPrivateConstructor p) { super(p); }
/**
* Overloaded function for {@link #setDescription(io.qt.gui.rhi.QRhiTextureRenderTargetDescription)}.
*/
@QtUninvokable
public final void setDescription(io.qt.gui.rhi.@StrictNonNull QRhiColorAttachment desc) {
setDescription(new io.qt.gui.rhi.QRhiTextureRenderTargetDescription(desc));
}
/**
* Overloaded function for {@link #setFlags(io.qt.gui.rhi.QRhiTextureRenderTarget.Flags)}.
*/
@QtUninvokable
public final void setFlags(io.qt.gui.rhi.QRhiTextureRenderTarget.@NonNull Flag @NonNull... f) {
setFlags(new io.qt.gui.rhi.QRhiTextureRenderTarget.Flags(f));
}
}