<class name="QGLContext" doc="/**
&lt;p&gt;The &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt; class encapsulates an OpenGL rendering context.&lt;/p&gt;
&lt;p&gt;An OpenGL rendering context is a complete set of OpenGL state variables. The rendering context's format&lt;/tt&gt; is set in the constructor, but it can also be set later with &lt;a href=&quot;QGLContext.html#setFormat(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;setFormat&lt;/tt&gt;&lt;/a&gt;. The format options that are actually set are returned by &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt;; the options you asked for are returned by &lt;a href=&quot;QGLContext.html#requestedFormat()&quot;&gt;&lt;tt&gt;requestedFormat&lt;/tt&gt;&lt;/a&gt;. Note that after a &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt; object has been constructed, the actual OpenGL context must be created by explicitly calling the &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;create()&lt;/a&gt; function. The &lt;a href=&quot;QGLContext.html#makeCurrent()&quot;&gt;&lt;tt&gt;makeCurrent&lt;/tt&gt;&lt;/a&gt; function makes this context the current rendering context. You can make &lt;i&gt;no&lt;/i&gt; context current using &lt;a href=&quot;QGLContext.html#doneCurrent()&quot;&gt;&lt;tt&gt;doneCurrent&lt;/tt&gt;&lt;/a&gt;. The &lt;a href=&quot;QGLContext.html#reset()&quot;&gt;&lt;tt&gt;reset&lt;/tt&gt;&lt;/a&gt; function will reset the context and make it invalid.&lt;/p&gt;
&lt;p&gt;You can examine properties of the context with, e.g&amp;#x2e; &lt;a href=&quot;QGLContext.html#isValid()&quot;&gt;&lt;tt&gt;isValid&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QGLContext.html#isSharing()&quot;&gt;&lt;tt&gt;isSharing&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QGLContext.html#initialized()&quot;&gt;&lt;tt&gt;initialized&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QGLContext.html#windowCreated()&quot;&gt;&lt;tt&gt;windowCreated&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QGLContext.html#overlayTransparentColor()&quot;&gt;&lt;tt&gt;overlayTransparentColor&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you're using double buffering you can swap the screen contents with the off-screen buffer using &lt;a href=&quot;QGLContext.html#swapBuffers()&quot;&gt;&lt;tt&gt;swapBuffers&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please note that &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt; is not thread safe.&lt;/p&gt;
 */">
    <method name="public QGLContext(com.trolltech.qt.opengl.QGLFormat format, com.trolltech.qt.gui.QPaintDeviceInterface device)" doc="/**
&lt;p&gt;This method is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.&lt;/p&gt;
&lt;p&gt;Constructs an OpenGL context for the given paint &lt;tt&gt;device&lt;/tt&gt;, which can be a widget or a pixmap. The &lt;tt&gt;format&lt;/tt&gt; specifies several display options for the context.&lt;/p&gt;
&lt;p&gt;If the underlying OpenGL/Window system cannot satisfy all the features requested in &lt;tt&gt;format&lt;/tt&gt;, the nearest subset of features will be used. After creation, the &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt; method will return the actual format obtained.&lt;/p&gt;
&lt;p&gt;Note that after a &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt; object has been constructed, &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;create&lt;/tt&gt;&lt;/a&gt; must be called explicitly to create the actual OpenGL context. The context will be &lt;a href=&quot;QGLContext.html#isValid()&quot;&gt;invalid&lt;/tt&gt;&lt;/a&gt; if it was not possible to obtain a GL context at all.&lt;/p&gt;
 */"/>
    <method name="public QGLContext(com.trolltech.qt.opengl.QGLFormat format)" doc="/**
&lt;p&gt;Constructs an OpenGL context with the given &lt;tt&gt;format&lt;/tt&gt; which specifies several display options for the context.&lt;/p&gt;
&lt;p&gt;If the underlying OpenGL/Window system cannot satisfy all the features requested in &lt;tt&gt;format&lt;/tt&gt;, the nearest subset of features will be used. After creation, the &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt; method will return the actual format obtained.&lt;/p&gt;
&lt;p&gt;Note that after a &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt; object has been constructed, &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;create&lt;/tt&gt;&lt;/a&gt; must be called explicitly to create the actual OpenGL context. The context will be &lt;a href=&quot;QGLContext.html#isValid()&quot;&gt;invalid&lt;/tt&gt;&lt;/a&gt; if it was not possible to obtain a GL context at all.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGLContext.html#isValid()&quot;&gt;&lt;tt&gt;isValid&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int bindTexture(com.trolltech.qt.gui.QImage image, int target, int format)" doc="/**
&lt;p&gt;Generates and binds a 2D GL texture to the current context, based on &lt;tt&gt;image&lt;/tt&gt;. The generated texture id is returned and can be used in later &lt;tt&gt;glBindTexture()&lt;/tt&gt; calls.&lt;/p&gt;
&lt;p&gt;The &lt;tt&gt;target&lt;/tt&gt; parameter specifies the texture target. The default target is &lt;tt&gt;GL_TEXTURE_2D&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;tt&gt;format&lt;/tt&gt; parameter sets the internal format for the texture. The default format is &lt;tt&gt;GL_RGBA8&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If the GL implementation supports the &lt;tt&gt;GL_SGIS_generate_mipmap&lt;/tt&gt; extension, mipmaps will be automatically generated for the texture. Mipmap generation is only supported for the &lt;tt&gt;GL_TEXTURE_2D&lt;/tt&gt; target.&lt;/p&gt;
&lt;p&gt;The texture that is generated is cached, so multiple calls to &lt;a href=&quot;QGLContext.html#bindTexture(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;bindTexture&lt;/tt&gt;&lt;/a&gt; with the same &lt;a href=&quot;%2E%2E/gui/QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt; will return the same texture id.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#deleteTexture(int)&quot;&gt;&lt;tt&gt;deleteTexture&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int bindTexture(com.trolltech.qt.gui.QImage image, int target)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QGLContext.html#bindTexture(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;bindTexture&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;image&lt;/tt&gt;, &lt;tt&gt;target&lt;/tt&gt;, GL_RGBA). */"/>
    <method name="public final int bindTexture(com.trolltech.qt.gui.QImage image)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QGLContext.html#bindTexture(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;bindTexture&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;image&lt;/tt&gt;, GL_TEXTURE_2D, GL_RGBA). */"/>
    <method name="public final int bindTexture(java.lang.String fileName)" doc="/**
&lt;p&gt;Reads the DirectDrawSurface (DDS) compressed file &lt;tt&gt;fileName&lt;/tt&gt; and generates a 2D GL texture from it.&lt;/p&gt;
&lt;p&gt;Only the DXT1, DXT3 and DXT5 DDS formats are supported.&lt;/p&gt;
&lt;p&gt;Note that this will only work if the implementation supports the &lt;tt&gt;GL_ARB_texture_compression&lt;/tt&gt; and &lt;tt&gt;GL_EXT_texture_compression_s3tc&lt;/tt&gt; extensions.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#deleteTexture(int)&quot;&gt;&lt;tt&gt;deleteTexture&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int bindTexture(com.trolltech.qt.gui.QPixmap pixmap, int target, int format)" doc="/**
&lt;p&gt;Generates and binds a 2D GL texture based on &lt;tt&gt;pixmap&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final int bindTexture(com.trolltech.qt.gui.QPixmap pixmap, int target)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QGLContext.html#bindTexture(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;bindTexture&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;pixmap&lt;/tt&gt;, &lt;tt&gt;target&lt;/tt&gt;, GL_RGBA). */"/>
    <method name="public final int bindTexture(com.trolltech.qt.gui.QPixmap pixmap)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QGLContext.html#bindTexture(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;bindTexture&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;pixmap&lt;/tt&gt;, GL_TEXTURE_2D, GL_RGBA). */"/>
    <method name="protected final int colorIndex(com.trolltech.qt.gui.QColor c)" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final void deleteTexture(int tx_id)" doc="/**
&lt;p&gt;Removes the texture identified by &lt;tt&gt;tx_id&lt;/tt&gt; from the texture cache. If the context is not shared by any other &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt;, glDeleteTextures() will be called to delete the texture from the context.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#bindTexture(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;bindTexture&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QPaintDeviceInterface device()" doc="/**
&lt;p&gt;Returns the paint device set for this context.&lt;/p&gt;

@see &lt;tt&gt;QGLContext::QGLContext&lt;/tt&gt; */"/>
    <method name="protected final boolean deviceIsPixmap()" doc="/**
&lt;p&gt;Returns true if the paint device of this context is a pixmap; otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.opengl.QGLFormat format()" doc="/**
&lt;p&gt;Returns the frame buffer format that was obtained (this may be a subset of what was requested).&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#setFormat(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;setFormat&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGLContext.html#requestedFormat()&quot;&gt;&lt;tt&gt;requestedFormat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final boolean initialized()" doc="/**
&lt;p&gt;Returns true if this context has been initialized, i.e&amp;#x2e; if QGLWidget::initializeGL() has been performed on it; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#setInitialized(boolean)&quot;&gt;&lt;tt&gt;setInitialized&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isSharing()" doc="/**
&lt;p&gt;Returns true if this context is sharing its GL context with another &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt;, otherwise false is returned. Note that context sharing might not be supported between contexts with different formats.&lt;/p&gt;
 */"/>
    <method name="public final boolean isValid()" doc="/**
&lt;p&gt;Returns true if a GL rendering context has been successfully created; otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QColor overlayTransparentColor()" doc="/**
&lt;p&gt;If this context is a valid context in an overlay plane, returns the plane's transparent color. Otherwise returns an invalid&lt;/tt&gt; color.&lt;/p&gt;
&lt;p&gt;The returned color's pixel&lt;/tt&gt; value is the index of the transparent color in the colormap of the overlay plane. (Naturally, the color's RGB values are meaningless.)&lt;/p&gt;
&lt;p&gt;The returned &lt;a href=&quot;%2E%2E/gui/QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt; object will generally work as expected only when passed as the argument to QGLWidget::qglColor() or QGLWidget::qglClearColor(). Under certain circumstances it can also be used to draw transparent graphics with a &lt;a href=&quot;%2E%2E/gui/QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;. See the examples/opengl/overlay_x11 example for details.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.opengl.QGLFormat requestedFormat()" doc="/**
&lt;p&gt;Returns the frame buffer format that was originally requested in the constructor or &lt;a href=&quot;QGLContext.html#setFormat(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;setFormat&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void reset()" doc="/**
&lt;p&gt;Resets the context and makes it invalid.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;create&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGLContext.html#isValid()&quot;&gt;&lt;tt&gt;isValid&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setFormat(com.trolltech.qt.opengl.QGLFormat format)" doc="/**
&lt;p&gt;Sets a &lt;tt&gt;format&lt;/tt&gt; for this context. The context is &lt;a href=&quot;QGLContext.html#reset()&quot;&gt;reset&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Call &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;create&lt;/tt&gt;&lt;/a&gt; to create a new GL context that tries to match the new format.&lt;/p&gt;
&lt;pre&gt;    QGLContext *cx;
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt;  ...
    QGLFormat f;
    f.setStereo(true);
    cx-&amp;gt;setFormat(f);
    if (!cx-&amp;gt;create())
        exit(); &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; no OpenGL support, or cannot render on the specified paintdevice
    if (!cx-&amp;gt;format().stereo())
        exit(); &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; could not create stereo context&lt;/pre&gt;

@see &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGLContext.html#reset()&quot;&gt;&lt;tt&gt;reset&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;create&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final void setInitialized(boolean on)" doc="/**
&lt;p&gt;If &lt;tt&gt;on&lt;/tt&gt; is true the context has been initialized, i.e&amp;#x2e; QGLContext::setInitialized() has been called on it. If &lt;tt&gt;on&lt;/tt&gt; is false the context has not been initialized.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#initialized()&quot;&gt;&lt;tt&gt;initialized&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final void setValid(boolean valid)" doc="/**
&lt;p&gt;&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#isValid()&quot;&gt;&lt;tt&gt;isValid&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final void setWindowCreated(boolean on)" doc="/**
&lt;p&gt;If &lt;tt&gt;on&lt;/tt&gt; is true the context has had a window created for it. If &lt;tt&gt;on&lt;/tt&gt; is false no window has been created for the context.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#windowCreated()&quot;&gt;&lt;tt&gt;windowCreated&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final boolean windowCreated()" doc="/**
&lt;p&gt;Returns true if a window has been created for this context; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#setWindowCreated(boolean)&quot;&gt;&lt;tt&gt;setWindowCreated&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected boolean chooseContext(com.trolltech.qt.opengl.QGLContext shareContext)" doc="/**
&lt;p&gt;This semi-internal function is called by &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;create&lt;/tt&gt;&lt;/a&gt;. It creates a system-dependent OpenGL handle that matches the &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt; of &lt;tt&gt;shareContext&lt;/tt&gt; as closely as possible, returning true if successful or false if a suitable handle could not be found.&lt;/p&gt;
&lt;p&gt;On Windows, it calls the virtual function choosePixelFormat(), which finds a matching pixel format identifier. On X11, it calls the virtual function chooseVisual() which finds an appropriate X visual. On other platforms it may work differently.&lt;/p&gt;
 */"/>
    <method name="protected final boolean chooseContext()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QGLContext.html#chooseContext(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;chooseContext&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="public boolean create(com.trolltech.qt.opengl.QGLContext shareContext)" doc="/**
&lt;p&gt;Creates the GL context. Returns true if it was successful in creating a valid GL rendering context on the paint device specified in the constructor; otherwise returns false (i.e&amp;#x2e; the context is invalid).&lt;/p&gt;
&lt;p&gt;After successful creation, &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt; returns the set of features of the created GL rendering context.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;shareContext&lt;/tt&gt; points to a valid &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt;, this method will try to establish OpenGL display list and texture object sharing between this context and the &lt;tt&gt;shareContext&lt;/tt&gt;. Note that this may fail if the two contexts have different &lt;a href=&quot;QGLContext.html#format()&quot;&gt;formats&lt;/tt&gt;&lt;/a&gt;. Use &lt;a href=&quot;QGLContext.html#isSharing()&quot;&gt;&lt;tt&gt;isSharing&lt;/tt&gt;&lt;/a&gt; to see if sharing is in effect.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; Implementation note: initialization of C++ class members usually takes place in the class constructor. &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt; is an exception because it must be simple to customize. The virtual functions &lt;a href=&quot;QGLContext.html#chooseContext(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;chooseContext&lt;/tt&gt;&lt;/a&gt; (and chooseVisual() for X11) can be reimplemented in a subclass to select a particular context. The problem is that virtual functions are not properly called during construction (even though this is correct C++) because C++ constructs class hierarchies from the bottom up. For this reason we need a &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;create&lt;/tt&gt;&lt;/a&gt; function.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#chooseContext(com.trolltech.qt.opengl.QGLContext)&quot;&gt;&lt;tt&gt;chooseContext&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGLContext.html#format()&quot;&gt;&lt;tt&gt;format&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QGLContext.html#isValid()&quot;&gt;&lt;tt&gt;isValid&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean create()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QGLContext.html#create(com.trolltech.qt.opengl.QGLContext)&quot;&gt;create&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="public void doneCurrent()" doc="/**
&lt;p&gt;Makes no GL context the current context. Normally, you do not need to call this function; &lt;a href=&quot;QGLContext.html#QGLContext(com.trolltech.qt.opengl.QGLFormat)&quot;&gt;&lt;tt&gt;QGLContext&lt;/tt&gt;&lt;/a&gt; calls it as necessary.&lt;/p&gt;
 */"/>
    <method name="public void makeCurrent()" doc="/**
&lt;p&gt;Makes this context the current OpenGL rendering context. All GL functions you call operate on this context until another context is made current.&lt;/p&gt;
&lt;p&gt;In some very rare cases the underlying call may fail. If this occurs an error message is output to stderr.&lt;/p&gt;
 */"/>
    <method name="public void swapBuffers()" doc="/**
&lt;p&gt;Swaps the screen contents with an off-screen buffer. Only works if the context is in double buffer mode.&lt;/p&gt;

@see &lt;tt&gt;QGLFormat::setDoubleBuffer&lt;/tt&gt; */"/>
    <method name="public native static com.trolltech.qt.opengl.QGLContext currentContext()" doc="/**
&lt;p&gt;Returns the current context, i.e&amp;#x2e; the context to which any OpenGL commands will currently be directed. Returns 0 if no context is current.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#makeCurrent()&quot;&gt;&lt;tt&gt;makeCurrent&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static void setTextureCacheLimit(int size)" doc="/**
&lt;p&gt;This function sets the limit for the texture cache to &lt;tt&gt;size&lt;/tt&gt;, expressed in kilobytes.&lt;/p&gt;
&lt;p&gt;By default, the cache limit is approximately 64 MB.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#textureCacheLimit()&quot;&gt;&lt;tt&gt;textureCacheLimit&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static int textureCacheLimit()" doc="/**
&lt;p&gt;Returns the current texture cache limit in kilobytes.&lt;/p&gt;

@see &lt;a href=&quot;QGLContext.html#setTextureCacheLimit(int)&quot;&gt;&lt;tt&gt;setTextureCacheLimit&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected native static com.trolltech.qt.opengl.QGLContext currentCtx()"/>
    <method name="protected static void setCurrentCtx(com.trolltech.qt.opengl.QGLContext currentCtx)"/>
</class>
