- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Friends

# QGLContext Class Reference

Search for all occurrences

## Detailed Description

Definition at line 298 of file qgl.h.

`#include <qgl.h>`

List of all members.

## Public Types
enum | BindOption { NoBindOption = 0x0000, InvertedYBindOption = 0x0001, MipmapBindOption = 0x0002, PremultipliedAlphaBindOption = 0x0004, LinearFilteringBindOption = 0x0008, MemoryManagedBindOption = 0x0010, CanFlipNativePixmapBindOption = 0x0020, DefaultBindOption, InternalBindOption }
## Public Member Functions
| QGLContext (const QGLFormat &format, QPaintDevice *device)
| QGLContext (const QGLFormat &format)
virtual | ~QGLContext ()
virtual bool | create (const QGLContext *shareContext=0)
bool | isValid () const
bool | isSharing () const
void | reset ()
QGLFormat | format () const
QGLFormat | requestedFormat () const
void | setFormat (const QGLFormat &format)
virtual void | makeCurrent ()
virtual void | doneCurrent ()
virtual void | swapBuffers () const
GLuint | bindTexture (const QImage &image, GLenum target, GLint format, BindOptions options)
GLuint | bindTexture (const QPixmap &pixmap, GLenum target, GLint format, BindOptions options)
GLuint | bindTexture (const QImage &image, GLenum target=GL_TEXTURE_2D, GLint format=GL_RGBA)
GLuint | bindTexture (const QPixmap &pixmap, GLenum target=GL_TEXTURE_2D, GLint format=GL_RGBA)
GLuint | bindTexture (const QString &fileName)
void | deleteTexture (GLuint tx_id)
void | drawTexture (const QRectF &target, GLuint textureId, GLenum textureTarget=GL_TEXTURE_2D)
void | drawTexture (const QPointF &point, GLuint textureId, GLenum textureTarget=GL_TEXTURE_2D)
void * | getProcAddress (const QString &proc) const
QPaintDevice * | device () const
QColor | overlayTransparentColor () const
## Static Public Member Functions
static bool | areSharing (const QGLContext *context1, const QGLContext *context2)
static void | setTextureCacheLimit (int size)
static int | textureCacheLimit ()
static const QGLContext * | currentContext ()
## Protected Member Functions
virtual bool | chooseContext (const QGLContext *shareContext=0)
bool | deviceIsPixmap () const
bool | windowCreated () const
void | setWindowCreated (bool on)
bool | initialized () const
void | setInitialized (bool on)
void | generateFontDisplayLists (const QFont &fnt, int listBase)
uint | colorIndex (const QColor &c) const
void | setValid (bool valid)
void | setDevice (QPaintDevice *pDev)
## Static Protected Attributes
static QGLContext * | currentCtx
## Friends
class | QGLPixelBuffer
class | QGLPixelBufferPrivate
class | QGLWidget
class | QGLWidgetPrivate
class | QGLGlyphCache
class | QOpenGLPaintEngine
class | QOpenGLPaintEnginePrivate
class | QGL2PaintEngineEx
class | QGL2PaintEngineExPrivate
class | QGLEngineShaderManager
class | QGLWindowSurface
class | QGLPixmapData
class | QGLPixmapFilterBase
class | QGLTextureGlyphCache
class | QGLContextGroup
class | QGLSharedResourceGuard
class | QGLPixmapBlurFilter
class | QGLExtensions
class | QGLFramebufferObject
class | QGLFramebufferObjectPrivate
class | QGLFBOGLPaintDevice
class | QGLPaintDevice
class | QGLWidgetGLPaintDevice
class | QX11GLPixmapData
class | QX11GLSharedContexts
QGLFormat::OpenGLVersionFlags | QGLFormat::openGLVersionFlags ()

## Member Enumeration Documentation

enum BindOption

Search for all occurrences

Enumerator:

  NoBindOption | Search for all occurrences
  InvertedYBindOption | Search for all occurrences
  MipmapBindOption | Search for all occurrences
  PremultipliedAlphaBindOption | Search for all occurrences
  LinearFilteringBindOption | Search for all occurrences
  MemoryManagedBindOption | Search for all occurrences
  CanFlipNativePixmapBindOption | Search for all occurrences
  DefaultBindOption | Search for all occurrences
  InternalBindOption | Search for all occurrences

Definition at line 323 of file qgl.h.

                        {
            NoBindOption                            = 0x0000,
            InvertedYBindOption                     = 0x0001,
            MipmapBindOption                        = 0x0002,
            PremultipliedAlphaBindOption            = 0x0004,
            LinearFilteringBindOption               = 0x0008,

            MemoryManagedBindOption                 = 0x0010, // internal flag
            CanFlipNativePixmapBindOption           = 0x0020, // internal flag

            DefaultBindOption                       = LinearFilteringBindOption
                                                      | InvertedYBindOption
                                                      | MipmapBindOption,
            InternalBindOption                      = MemoryManagedBindOption
                                                      | PremultipliedAlphaBindOption
        };

## Constructor & Destructor Documentation

QGLContext | ( | const QGLFormat & | format,
|  | QPaintDevice * | device
| ) |  |

QGLContext | ( | const QGLFormat & | format | ) |

virtual ~QGLContext | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual bool create | ( | const QGLContext * | shareContext = `0` | ) | `[virtual]`

Search for all occurrences

bool isValid | ( |  | ) | const

Search for all occurrences

bool isSharing | ( |  | ) | const

Search for all occurrences

void reset | ( |  | ) |

Search for all occurrences

static bool areSharing | ( | const QGLContext * | context1,
|  | const QGLContext * | context2
| ) |  | `[static]`

Search for all occurrences

QGLFormat format | ( |  | ) | const

Search for all occurrences

QGLFormat requestedFormat | ( |  | ) | const

Search for all occurrences

void setFormat | ( | const QGLFormat & | format | ) |

Search for all occurrences

virtual void makeCurrent | ( |  | ) | `[virtual]`

Search for all occurrences

virtual void doneCurrent | ( |  | ) | `[virtual]`

Search for all occurrences

virtual void swapBuffers | ( |  | ) | const `[virtual]`

Search for all occurrences

GLuint bindTexture | ( | const QImage & | image,
|  | GLenum | target,
|  | GLint | format,
|  | BindOptions | options
| ) |  |

Search for all occurrences

GLuint bindTexture | ( | const QPixmap & | pixmap,
|  | GLenum | target,
|  | GLint | format,
|  | BindOptions | options
| ) |  |

Search for all occurrences

GLuint bindTexture | ( | const QImage & | image,
|  | GLenum | target = `GL_TEXTURE_2D`,
|  | GLint | format = `GL_RGBA`
| ) |  |

Search for all occurrences

GLuint bindTexture | ( | const QPixmap & | pixmap,
|  | GLenum | target = `GL_TEXTURE_2D`,
|  | GLint | format = `GL_RGBA`
| ) |  |

Search for all occurrences

GLuint bindTexture | ( | const QString & | fileName | ) |

Search for all occurrences

void deleteTexture | ( | GLuint | tx_id | ) |

Search for all occurrences

void drawTexture | ( | const QRectF & | target,
|  | GLuint | textureId,
|  | GLenum | textureTarget = `GL_TEXTURE_2D`
| ) |  |

Search for all occurrences

void drawTexture | ( | const QPointF & | point,
|  | GLuint | textureId,
|  | GLenum | textureTarget = `GL_TEXTURE_2D`
| ) |  |

Search for all occurrences

static void setTextureCacheLimit | ( | int | size | ) | `[static]`

Search for all occurrences

static int textureCacheLimit | ( |  | ) | `[static]`

Search for all occurrences

void* getProcAddress | ( | const QString & | proc | ) | const

Search for all occurrences

QPaintDevice* device | ( |  | ) | const

Search for all occurrences

QColor overlayTransparentColor | ( |  | ) | const

Search for all occurrences

static const QGLContext* currentContext | ( |  | ) | `[static]`

Search for all occurrences

virtual bool chooseContext | ( | const QGLContext * | shareContext = `0` | ) | `[protected, virtual]`

Search for all occurrences

bool deviceIsPixmap | ( |  | ) | const `[protected]`

Search for all occurrences

bool windowCreated | ( |  | ) | const `[protected]`

Search for all occurrences

void setWindowCreated | ( | bool | on | ) | `[protected]`

Search for all occurrences

bool initialized | ( |  | ) | const `[protected]`

Search for all occurrences

void setInitialized | ( | bool | on | ) | `[protected]`

Search for all occurrences

void generateFontDisplayLists | ( | const QFont & | fnt,
|  | int | listBase
| ) |  | `[protected]`

Search for all occurrences

uint colorIndex | ( | const QColor & | c | ) | const `[protected]`

Search for all occurrences

void setValid | ( | bool | valid | ) | `[protected]`

Search for all occurrences

void setDevice | ( | QPaintDevice * | pDev | ) | `[protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QGLPixelBuffer `[friend]`

Search for all occurrences

Definition at line 413 of file qgl.h.

friend class QGLPixelBufferPrivate `[friend]`

Search for all occurrences

Definition at line 414 of file qgl.h.

friend class QGLWidget `[friend]`

Search for all occurrences

Definition at line 415 of file qgl.h.

friend class QGLWidgetPrivate `[friend]`

Search for all occurrences

Definition at line 416 of file qgl.h.

friend class QGLGlyphCache `[friend]`

Search for all occurrences

Definition at line 417 of file qgl.h.

friend class QOpenGLPaintEngine `[friend]`

Search for all occurrences

Definition at line 418 of file qgl.h.

friend class QOpenGLPaintEnginePrivate `[friend]`

Search for all occurrences

Definition at line 419 of file qgl.h.

friend class QGL2PaintEngineEx `[friend]`

Search for all occurrences

Definition at line 420 of file qgl.h.

friend class QGL2PaintEngineExPrivate `[friend]`

Search for all occurrences

Definition at line 421 of file qgl.h.

friend class QGLEngineShaderManager `[friend]`

Search for all occurrences

Definition at line 422 of file qgl.h.

friend class QGLWindowSurface `[friend]`

Search for all occurrences

Definition at line 423 of file qgl.h.

friend class QGLPixmapData `[friend]`

Search for all occurrences

Definition at line 424 of file qgl.h.

friend class QGLPixmapFilterBase `[friend]`

Search for all occurrences

Definition at line 425 of file qgl.h.

friend class QGLTextureGlyphCache `[friend]`

Search for all occurrences

Definition at line 426 of file qgl.h.

friend class QGLContextGroup `[friend]`

Search for all occurrences

Definition at line 427 of file qgl.h.

friend class QGLSharedResourceGuard `[friend]`

Search for all occurrences

Definition at line 428 of file qgl.h.

friend class QGLPixmapBlurFilter `[friend]`

Search for all occurrences

Definition at line 429 of file qgl.h.

friend class QGLExtensions `[friend]`

Search for all occurrences

Definition at line 430 of file qgl.h.

friend class QGLFramebufferObject `[friend]`

Search for all occurrences

Definition at line 439 of file qgl.h.

friend class QGLFramebufferObjectPrivate `[friend]`

Search for all occurrences

Definition at line 440 of file qgl.h.

friend class QGLFBOGLPaintDevice `[friend]`

Search for all occurrences

Definition at line 441 of file qgl.h.

friend class QGLPaintDevice `[friend]`

Search for all occurrences

Definition at line 442 of file qgl.h.

friend class QGLWidgetGLPaintDevice `[friend]`

Search for all occurrences

Definition at line 443 of file qgl.h.

friend class QX11GLPixmapData `[friend]`

Search for all occurrences

Definition at line 444 of file qgl.h.

friend class QX11GLSharedContexts `[friend]`

Search for all occurrences

Definition at line 445 of file qgl.h.

QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags | ( |  | ) | `[friend]`

Search for all occurrences

## Member Data Documentation

QGLContext* currentCtx `[static, protected]`

Search for all occurrences

Definition at line 408 of file qgl.h.

The documentation for this class was generated from the following file:

- QtOpenGL/qgl.h

QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext
QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext QGLContext