QGLContext Class Reference


#include <qgl.h>

List of all member functions.

Public Members

Protected Members


Detailed Description

The QGLContext class provides an OpenGL context.

Member Function Documentation

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

Constructs an OpenGL context for the paint device device, which must be a widget or a pixmap. The format specify several display options for this context.

The context will be invalid if the format settings cannot be satified.

See also: isValid().

QGLContext::~QGLContext () [virtual]

Destroys the OpenGL context.

bool QGLContext::create ()

Creates the GL context. Returns TRUE if it was successful in creating a context that satisfies the requested format, otherwise FALSE is returned (the context is invalid).

void QGLContext::setFormat ( const QGLFormat &format)

Sets a new OpenGL context specification format. The context is reset. Call create() to create a new context that matches this format.

    QGLContext *cx;
      ...
    QGLFormat f;
    f.setAlpha( TRUE );
    f.setStereo( TRUE );
    cx->setFormat( f );
    if ( !cx->create() )
        ; // could not create context

See also: format(), reset() and create().


This file is part of the Qt toolkit, copyright © 1992-97 Troll Tech, all rights reserved.

It was generated from the following files:


Generated at 17:31, 1997/04/07 for Qt version 1.2 by the webmaster at Troll Tech