io.qt.gui.QOpenGLContext Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Represents a native OpenGL context, enabling OpenGL rendering on a QSurface
* Java wrapper for Qt class QOpenGLContext
*/
public class QOpenGLContext extends io.qt.core.QObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QOpenGLContext.class);
/**
* Java wrapper for Qt enum QOpenGLContext::OpenGLModuleType
*/
@QtUnlistedEnum
public enum OpenGLModuleType implements QtEnumerator {
/**
* Representing QOpenGLContext:: LibGL
*/
LibGL(0),
/**
* Representing QOpenGLContext:: LibGLES
*/
LibGLES(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private OpenGLModuleType(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 OpenGLModuleType resolve(int value) {
switch (value) {
case 0: return LibGL;
case 1: return LibGLES;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QOpenGLContext:: aboutToBeDestroyed()
*/
public final @NonNull Signal0 aboutToBeDestroyed = new Signal0();
/**
* See QOpenGLContext:: QOpenGLContext(QObject*)
*/
public QOpenGLContext(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QOpenGLContext instance, io.qt.core.QObject parent);
/**
*
*/
@QtUninvokable
public final boolean create(){
return create_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean create_native(long __this__nativeId);
/**
* See QOpenGLContext:: defaultFramebufferObject()const
*/
@QtUninvokable
public final int defaultFramebufferObject(){
return defaultFramebufferObject_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int defaultFramebufferObject_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: doneCurrent()
*/
@QtUninvokable
public final void doneCurrent(){
doneCurrent_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void doneCurrent_native(long __this__nativeId);
/**
* See QOpenGLContext:: extensions()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QSet extensions(){
return extensions_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSet extensions_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: extraFunctions()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QOpenGLExtraFunctions extraFunctions(){
return extraFunctions_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QOpenGLExtraFunctions extraFunctions_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: format()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QSurfaceFormat format(){
return format_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QSurfaceFormat format_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: functions()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QOpenGLFunctions functions(){
return functions_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QOpenGLFunctions functions_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: getProcAddress(QByteArray)const
*/
@QtUninvokable
public final io.qt.core.@Nullable QFunctionPointer getProcAddress(io.qt.core.@NonNull QByteArray procName){
return getProcAddress_native_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(procName));
}
@QtUninvokable
private native io.qt.core.QFunctionPointer getProcAddress_native_cref_QByteArray_constfct(long __this__nativeId, long procName);
/**
* See QOpenGLContext:: getProcAddress(const char*)const
*/
@QtUninvokable
public final io.qt.core.@Nullable QFunctionPointer getProcAddress(java.lang.@Nullable String procName){
return getProcAddress_native_const_char_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), procName);
}
@QtUninvokable
private native io.qt.core.QFunctionPointer getProcAddress_native_const_char_ptr_constfct(long __this__nativeId, java.lang.String procName);
/**
* See QOpenGLContext:: hasExtension(QByteArray)const
*/
@QtUninvokable
public final boolean hasExtension(io.qt.core.@NonNull QByteArray extension){
return hasExtension_native_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(extension));
}
@QtUninvokable
private native boolean hasExtension_native_cref_QByteArray_constfct(long __this__nativeId, long extension);
/**
* See QOpenGLContext:: isOpenGLES()const
*/
@QtUninvokable
public final boolean isOpenGLES(){
return isOpenGLES_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isOpenGLES_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: isValid()const
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: makeCurrent(QSurface*)
*/
@QtUninvokable
public final boolean makeCurrent(io.qt.gui.@Nullable QSurface surface){
return makeCurrent_native_QSurface_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(surface));
}
@QtUninvokable
private native boolean makeCurrent_native_QSurface_ptr(long __this__nativeId, long surface);
/**
* See QOpenGLContext:: resolveInterface(const char*, int)const
*/
@QtUninvokable
public final QNativeInterface nativeInterface(java.lang.Class name){
return nativeInterface_native_const_char_ptr_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), name);
}
@QtUninvokable
private native QNativeInterface nativeInterface_native_const_char_ptr_int_constfct(long __this__nativeId, java.lang.Class name);
/**
* See QOpenGLContext:: screen()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QScreen screen(){
return screen_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QScreen screen_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: setFormat(QSurfaceFormat)
*/
@QtUninvokable
public final void setFormat(io.qt.gui.@NonNull QSurfaceFormat format){
setFormat_native_cref_QSurfaceFormat(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(format));
}
@QtUninvokable
private native void setFormat_native_cref_QSurfaceFormat(long __this__nativeId, long format);
/**
* See QOpenGLContext:: setScreen(QScreen*)
*/
@QtUninvokable
public final void setScreen(io.qt.gui.@Nullable QScreen screen){
setScreen_native_QScreen_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(screen));
}
@QtUninvokable
private native void setScreen_native_QScreen_ptr(long __this__nativeId, long screen);
/**
* See QOpenGLContext:: setShareContext(QOpenGLContext*)
*/
@QtUninvokable
public final void setShareContext(io.qt.gui.@Nullable QOpenGLContext shareContext){
setShareContext_native_QOpenGLContext_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(shareContext));
}
@QtUninvokable
private native void setShareContext_native_QOpenGLContext_ptr(long __this__nativeId, long shareContext);
/**
* See QOpenGLContext:: shareContext()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QOpenGLContext shareContext(){
return shareContext_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QOpenGLContext shareContext_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: shareGroup()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QOpenGLContextGroup shareGroup(){
return shareGroup_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QOpenGLContextGroup shareGroup_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: surface()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QSurface surface(){
return surface_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QSurface surface_native_constfct(long __this__nativeId);
/**
* See QOpenGLContext:: swapBuffers(QSurface*)
*/
@QtUninvokable
public final void swapBuffers(io.qt.gui.@Nullable QSurface surface){
swapBuffers_native_QSurface_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(surface));
}
@QtUninvokable
private native void swapBuffers_native_QSurface_ptr(long __this__nativeId, long surface);
/**
* See QOpenGLContext:: areSharing(QOpenGLContext*, QOpenGLContext*)
*/
public static boolean areSharing(io.qt.gui.@Nullable QOpenGLContext first, io.qt.gui.@Nullable QOpenGLContext second){
return areSharing_native_QOpenGLContext_ptr_QOpenGLContext_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(first), QtJambi_LibraryUtilities.internal.checkedNativeId(second));
}
private native static boolean areSharing_native_QOpenGLContext_ptr_QOpenGLContext_ptr(long first, long second);
/**
* See QOpenGLContext:: currentContext()
*/
public native static io.qt.gui.@Nullable QOpenGLContext currentContext();
/**
* See QOpenGLContext:: globalShareContext()
*/
public native static io.qt.gui.@Nullable QOpenGLContext globalShareContext();
/**
* See QOpenGLContext:: openGLModuleType()
*/
public static io.qt.gui.QOpenGLContext.@NonNull OpenGLModuleType openGLModuleType(){
return io.qt.gui.QOpenGLContext.OpenGLModuleType.resolve(openGLModuleType_native());
}
private native static int openGLModuleType_native();
/**
* See QOpenGLContext:: supportsThreadedOpenGL()
*/
public native static boolean supportsThreadedOpenGL();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QOpenGLContext(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QOpenGLContext(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QOpenGLContext instance, QDeclarativeConstructor constructor);
/**
* See operator<<(QDebug, const QOpenGLContext*)
*/
@QtUninvokable
@Override
public @NonNull String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native String toString_native(long __this_nativeId);
/**
* Overloaded constructor for {@link #QOpenGLContext(io.qt.core.QObject)}
* with parent = null
.
*/
public QOpenGLContext() {
this((io.qt.core.QObject)null);
}
/**
* Overloaded function for {@link #getProcAddress(io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final io.qt.core.@Nullable QFunctionPointer getProcAddress(byte @NonNull[] procName) {
return getProcAddress(new io.qt.core.QByteArray(procName));
}
/**
* Overloaded function for {@link #hasExtension(io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final boolean hasExtension(byte @NonNull[] extension) {
return hasExtension(new io.qt.core.QByteArray(extension));
}
/**
* Overloaded function for {@link #setFormat(io.qt.gui.QSurfaceFormat)}.
*/
@QtUninvokable
public final void setFormat(io.qt.gui.QSurfaceFormat.@NonNull FormatOptions format) {
setFormat(new io.qt.gui.QSurfaceFormat(format));
}
}