Doc: Fix some documentation issues.
Change-Id: I21bba7b8a1808cf214cae1b7d3b6b5e41e36e3ba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
This commit is contained in:
parent
70bc7f8b32
commit
3d04e4965e
@ -210,7 +210,7 @@ QOpenGLContext* QOpenGLContext::currentContext()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns true if the two contexts are sharing OpenGL resources.
|
Returns true if the \a first and \a second contexts are sharing OpenGL resources.
|
||||||
*/
|
*/
|
||||||
bool QOpenGLContext::areSharing(QOpenGLContext *first, QOpenGLContext *second)
|
bool QOpenGLContext::areSharing(QOpenGLContext *first, QOpenGLContext *second)
|
||||||
{
|
{
|
||||||
@ -243,7 +243,7 @@ QPlatformOpenGLContext *QOpenGLContext::shareHandle() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Creates a new OpenGL context instance.
|
Creates a new OpenGL context instance with parent object \a parent.
|
||||||
|
|
||||||
Before it can be used you need to set the proper format and call create().
|
Before it can be used you need to set the proper format and call create().
|
||||||
|
|
||||||
@ -267,8 +267,8 @@ void QOpenGLContext::setFormat(const QSurfaceFormat &format)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the context to share textures, shaders, and other OpenGL resources
|
Makes this context share textures, shaders, and other OpenGL resources
|
||||||
with. You need to call create() before it takes effect.
|
with \a shareContext. You need to call create() before it takes effect.
|
||||||
*/
|
*/
|
||||||
void QOpenGLContext::setShareContext(QOpenGLContext *shareContext)
|
void QOpenGLContext::setShareContext(QOpenGLContext *shareContext)
|
||||||
{
|
{
|
||||||
@ -460,7 +460,7 @@ GLuint QOpenGLContext::defaultFramebufferObject() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Makes the context current in the current thread, against the given
|
Makes the context current in the current thread, against the given
|
||||||
\a surface.
|
\a surface. Returns true if successful.
|
||||||
|
|
||||||
If \a surface is 0 this is equivalent to calling doneCurrent().
|
If \a surface is 0 this is equivalent to calling doneCurrent().
|
||||||
|
|
||||||
@ -546,7 +546,7 @@ QSurface *QOpenGLContext::surface() const
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Swap the back and front buffers of the given surface.
|
Swap the back and front buffers of \a surface.
|
||||||
|
|
||||||
Call this to finish a frame of OpenGL rendering, and make sure to
|
Call this to finish a frame of OpenGL rendering, and make sure to
|
||||||
call makeCurrent() again before you begin a new frame.
|
call makeCurrent() again before you begin a new frame.
|
||||||
|
@ -1175,7 +1175,7 @@ QOpenGLFramebufferObject::Attachment QOpenGLFramebufferObject::attachment() cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the attachments of the framebuffer object.
|
Sets the attachments of the framebuffer object to \a attachment.
|
||||||
|
|
||||||
This can be used to free or reattach the depth and stencil buffer
|
This can be used to free or reattach the depth and stencil buffer
|
||||||
attachments as needed.
|
attachments as needed.
|
||||||
|
@ -96,7 +96,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
void MyGLWindow::initializeGL()
|
void MyGLWindow::initializeGL()
|
||||||
{
|
{
|
||||||
m_context->makeCurrent(this);
|
m_context->makeCurrent(this);
|
||||||
initializeGLFunctions();
|
initializeOpenGLFunctions();
|
||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
@ -157,6 +157,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
\value Multisample glSampleCoverage() function is available.
|
\value Multisample glSampleCoverage() function is available.
|
||||||
\value StencilSeparate Separate stencil functions are available.
|
\value StencilSeparate Separate stencil functions are available.
|
||||||
\value NPOTTextures Non power of two textures are available.
|
\value NPOTTextures Non power of two textures are available.
|
||||||
|
\value NPOTTextureRepeat Non power of two textures can use GL_REPEAT as wrap parameter.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Hidden private fields for additional extension data.
|
// Hidden private fields for additional extension data.
|
||||||
@ -198,10 +199,10 @@ static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = 0)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Constructs a default function resolver. The resolver cannot
|
Constructs a default function resolver. The resolver cannot
|
||||||
be used until initializeGLFunctions() is called to specify
|
be used until initializeOpenGLFunctions() is called to specify
|
||||||
the context.
|
the context.
|
||||||
|
|
||||||
\sa initializeGLFunctions()
|
\sa initializeOpenGLFunctions()
|
||||||
*/
|
*/
|
||||||
QOpenGLFunctions::QOpenGLFunctions()
|
QOpenGLFunctions::QOpenGLFunctions()
|
||||||
: d_ptr(0)
|
: d_ptr(0)
|
||||||
@ -215,10 +216,10 @@ QOpenGLFunctions::QOpenGLFunctions()
|
|||||||
The context or another context in the group must be current.
|
The context or another context in the group must be current.
|
||||||
|
|
||||||
An object constructed in this way can only be used with \a context
|
An object constructed in this way can only be used with \a context
|
||||||
and other contexts that share with it. Use initializeGLFunctions()
|
and other contexts that share with it. Use initializeOpenGLFunctions()
|
||||||
to change the object's context association.
|
to change the object's context association.
|
||||||
|
|
||||||
\sa initializeGLFunctions()
|
\sa initializeOpenGLFunctions()
|
||||||
*/
|
*/
|
||||||
QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext *context)
|
QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext *context)
|
||||||
: d_ptr(0)
|
: d_ptr(0)
|
||||||
@ -439,6 +440,13 @@ bool QOpenGLExtensions::hasOpenGLExtension(QOpenGLExtensions::OpenGLExtension ex
|
|||||||
return (d->m_extensions & int(extension)) != 0;
|
return (d->m_extensions & int(extension)) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn void QOpenGLFunctions::initializeGLFunctions()
|
||||||
|
\obsolete
|
||||||
|
|
||||||
|
Use initializeOpenGLFunctions() instead.
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Initializes OpenGL function resolution for the current context.
|
Initializes OpenGL function resolution for the current context.
|
||||||
|
|
||||||
@ -1456,6 +1464,11 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
|
|||||||
This convenience function will do nothing on OpenGL/ES 1.x systems.
|
This convenience function will do nothing on OpenGL/ES 1.x systems.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn bool QOpenGLFunctions::isInitialized(const QOpenGLFunctionsPrivate *d)
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
enum ResolvePolicy
|
enum ResolvePolicy
|
||||||
|
@ -111,7 +111,7 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(const QSize &size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Constructs a QOpenGLPaintDevice with the given \a size and \a ctx.
|
Constructs a QOpenGLPaintDevice with the given \a width and \a height.
|
||||||
|
|
||||||
The QOpenGLPaintDevice is only valid for the current context.
|
The QOpenGLPaintDevice is only valid for the current context.
|
||||||
|
|
||||||
@ -122,11 +122,21 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(int width, int height)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Destroys the QOpenGLPaintDevice.
|
||||||
|
*/
|
||||||
|
|
||||||
QOpenGLPaintDevice::~QOpenGLPaintDevice()
|
QOpenGLPaintDevice::~QOpenGLPaintDevice()
|
||||||
{
|
{
|
||||||
delete d_ptr->engine;
|
delete d_ptr->engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn int QOpenGLPaintDevice::devType() const
|
||||||
|
\internal
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
|
|
||||||
QOpenGLPaintDevicePrivate::QOpenGLPaintDevicePrivate(const QSize &sz)
|
QOpenGLPaintDevicePrivate::QOpenGLPaintDevicePrivate(const QSize &sz)
|
||||||
: size(sz)
|
: size(sz)
|
||||||
, ctx(QOpenGLContext::currentContext())
|
, ctx(QOpenGLContext::currentContext())
|
||||||
@ -153,6 +163,10 @@ private:
|
|||||||
|
|
||||||
Q_GLOBAL_STATIC(QOpenGLEngineThreadStorage, qt_opengl_engine)
|
Q_GLOBAL_STATIC(QOpenGLEngineThreadStorage, qt_opengl_engine)
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
|
|
||||||
QPaintEngine *QOpenGLPaintDevice::paintEngine() const
|
QPaintEngine *QOpenGLPaintDevice::paintEngine() const
|
||||||
{
|
{
|
||||||
if (d_ptr->engine)
|
if (d_ptr->engine)
|
||||||
@ -167,21 +181,41 @@ QPaintEngine *QOpenGLPaintDevice::paintEngine() const
|
|||||||
return engine;
|
return engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the OpenGL context associated with the paint device.
|
||||||
|
*/
|
||||||
|
|
||||||
QOpenGLContext *QOpenGLPaintDevice::context() const
|
QOpenGLContext *QOpenGLPaintDevice::context() const
|
||||||
{
|
{
|
||||||
return d_ptr->ctx;
|
return d_ptr->ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the pixel size of the paint device.
|
||||||
|
|
||||||
|
\sa setSize()
|
||||||
|
*/
|
||||||
|
|
||||||
QSize QOpenGLPaintDevice::size() const
|
QSize QOpenGLPaintDevice::size() const
|
||||||
{
|
{
|
||||||
return d_ptr->size;
|
return d_ptr->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the pixel size of the paint device to \a size.
|
||||||
|
|
||||||
|
\sa size()
|
||||||
|
*/
|
||||||
|
|
||||||
void QOpenGLPaintDevice::setSize(const QSize &size)
|
void QOpenGLPaintDevice::setSize(const QSize &size)
|
||||||
{
|
{
|
||||||
d_ptr->size = size;
|
d_ptr->size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\reimp
|
||||||
|
*/
|
||||||
|
|
||||||
int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
|
int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
|
||||||
{
|
{
|
||||||
switch (metric) {
|
switch (metric) {
|
||||||
@ -211,34 +245,66 @@ int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the number of pixels per meter horizontally.
|
||||||
|
|
||||||
|
\sa setDotsPerMeterX()
|
||||||
|
*/
|
||||||
|
|
||||||
qreal QOpenGLPaintDevice::dotsPerMeterX() const
|
qreal QOpenGLPaintDevice::dotsPerMeterX() const
|
||||||
{
|
{
|
||||||
return d_ptr->dpmx;
|
return d_ptr->dpmx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the number of pixels per meter vertically.
|
||||||
|
|
||||||
|
\sa setDotsPerMeterY()
|
||||||
|
*/
|
||||||
|
|
||||||
qreal QOpenGLPaintDevice::dotsPerMeterY() const
|
qreal QOpenGLPaintDevice::dotsPerMeterY() const
|
||||||
{
|
{
|
||||||
return d_ptr->dpmy;
|
return d_ptr->dpmy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the number of pixels per meter horizontally to \a dpmx.
|
||||||
|
|
||||||
|
\sa dotsPerMeterX()
|
||||||
|
*/
|
||||||
|
|
||||||
void QOpenGLPaintDevice::setDotsPerMeterX(qreal dpmx)
|
void QOpenGLPaintDevice::setDotsPerMeterX(qreal dpmx)
|
||||||
{
|
{
|
||||||
d_ptr->dpmx = dpmx;
|
d_ptr->dpmx = dpmx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the number of pixels per meter vertically to \a dpmy.
|
||||||
|
|
||||||
|
\sa dotsPerMeterY()
|
||||||
|
*/
|
||||||
|
|
||||||
void QOpenGLPaintDevice::setDotsPerMeterY(qreal dpmy)
|
void QOpenGLPaintDevice::setDotsPerMeterY(qreal dpmy)
|
||||||
{
|
{
|
||||||
d_ptr->dpmx = dpmy;
|
d_ptr->dpmx = dpmy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Specifies whether painting should be flipped around the Y-axis or not.
|
Sets whether painting should be flipped around the Y-axis or not to \a flipped.
|
||||||
|
|
||||||
|
\sa paintFlipped()
|
||||||
*/
|
*/
|
||||||
void QOpenGLPaintDevice::setPaintFlipped(bool flipped)
|
void QOpenGLPaintDevice::setPaintFlipped(bool flipped)
|
||||||
{
|
{
|
||||||
d_ptr->flipped = flipped;
|
d_ptr->flipped = flipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns true if painting is flipped around the Y-axis.
|
||||||
|
|
||||||
|
\sa setPaintFlipped()
|
||||||
|
*/
|
||||||
|
|
||||||
bool QOpenGLPaintDevice::paintFlipped() const
|
bool QOpenGLPaintDevice::paintFlipped() const
|
||||||
{
|
{
|
||||||
return d_ptr->flipped;
|
return d_ptr->flipped;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user