io.qt.gui.rhi.QRhiComputePipeline Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qtjambi Show documentation
Show all versions of qtjambi Show documentation
QtJambi base module containing QtCore, QtGui and QtWidgets.
package io.qt.gui.rhi;
import io.qt.*;
/**
* Compute pipeline state resource
* Java wrapper for Qt class QRhiComputePipeline
*/
public abstract class QRhiComputePipeline extends io.qt.gui.rhi.QRhiResource
{
@QtPropertyMember(enabled=false)
private Object __rcShaderResourceBindings = null;
@NativeAccess
private static final class ConcreteWrapper extends QRhiComputePipeline {
@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 QRhiComputePipeline::Flag
*
* @see Flags
*/
public enum Flag implements QtFlagEnumerator {
/**
* Representing QRhiComputePipeline:: CompileShadersWithDebugInfo
*/
CompileShadersWithDebugInfo(1);
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 CompileShadersWithDebugInfo;
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());
}
}
/**
* See QRhiComputePipeline:: flags()const
*/
@QtUninvokable
public final io.qt.gui.rhi.QRhiComputePipeline.@NonNull Flags flags(){
return new io.qt.gui.rhi.QRhiComputePipeline.Flags(flags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int flags_native_constfct(long __this__nativeId);
/**
* See QRhiComputePipeline:: setFlags(QRhiComputePipeline::Flags)
*/
@QtUninvokable
public final void setFlags(io.qt.gui.rhi.QRhiComputePipeline.@NonNull Flags f){
setFlags_native_QRhiComputePipeline_Flags(QtJambi_LibraryUtilities.internal.nativeId(this), f.value());
}
@QtUninvokable
private native void setFlags_native_QRhiComputePipeline_Flags(long __this__nativeId, int f);
/**
* See QRhiComputePipeline:: setShaderResourceBindings(QRhiShaderResourceBindings*)
*/
@QtUninvokable
public final void setShaderResourceBindings(io.qt.gui.rhi.@Nullable QRhiShaderResourceBindings srb){
setShaderResourceBindings_native_QRhiShaderResourceBindings_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(srb));
__rcShaderResourceBindings = srb;
}
@QtUninvokable
private native void setShaderResourceBindings_native_QRhiShaderResourceBindings_ptr(long __this__nativeId, long srb);
/**
* See QRhiComputePipeline:: setShaderStage(QRhiShaderStage)
*/
@QtUninvokable
public final void setShaderStage(io.qt.gui.rhi.@StrictNonNull QRhiShaderStage stage){
java.util.Objects.requireNonNull(stage, "Argument 'stage': null not expected.");
setShaderStage_native_cref_QRhiShaderStage(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(stage));
}
@QtUninvokable
private native void setShaderStage_native_cref_QRhiShaderStage(long __this__nativeId, long stage);
/**
* See QRhiComputePipeline:: shaderResourceBindings()const
*/
@QtUninvokable
public final io.qt.gui.rhi.@Nullable QRhiShaderResourceBindings shaderResourceBindings(){
return shaderResourceBindings_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.rhi.QRhiShaderResourceBindings shaderResourceBindings_native_constfct(long __this__nativeId);
/**
* See QRhiComputePipeline:: shaderStage()const
*/
@QtUninvokable
public final io.qt.gui.rhi.@NonNull QRhiShaderStage shaderStage(){
return shaderStage_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.rhi.QRhiShaderStage shaderStage_native_constfct(long __this__nativeId);
/**
* See QRhiComputePipeline:: create()
*/
@QtUninvokable
public abstract boolean create();
@QtUninvokable
private native boolean create_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 QRhiComputePipeline(QPrivateConstructor p) { super(p); }
/**
* Overloaded function for {@link #setFlags(io.qt.gui.rhi.QRhiComputePipeline.Flags)}.
*/
@QtUninvokable
public final void setFlags(io.qt.gui.rhi.QRhiComputePipeline.@NonNull Flag @NonNull... f) {
setFlags(new io.qt.gui.rhi.QRhiComputePipeline.Flags(f));
}
}