Use "OpenGL" instead of just "GL" in documentation.
Change-Id: I81a0beebc0241b9699ce321174e13a93e76e45e8 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
This commit is contained in:
parent
bb5c7b75a8
commit
9610458e0c
@ -239,7 +239,7 @@ void QOpenGLContext::setShareContext(QOpenGLContext *shareContext)
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the \a screen the GL context should be valid for. You need to call
|
||||
Sets the \a screen the OpenGL context should be valid for. You need to call
|
||||
create() before it takes effect.
|
||||
*/
|
||||
void QOpenGLContext::setScreen(QScreen *screen)
|
||||
|
@ -49,16 +49,16 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLBuffer
|
||||
\brief The QOpenGLBuffer class provides functions for creating and managing GL buffer objects.
|
||||
\brief The QOpenGLBuffer class provides functions for creating and managing OpenGL buffer objects.
|
||||
\since 5.0
|
||||
\ingroup painting-3D
|
||||
|
||||
Buffer objects are created in the GL server so that the
|
||||
Buffer objects are created in the OpenGL server so that the
|
||||
client application can avoid uploading vertices, indices,
|
||||
texture image data, etc every time they are needed.
|
||||
|
||||
QOpenGLBuffer objects can be copied around as a reference to the
|
||||
underlying GL buffer object:
|
||||
underlying OpenGL buffer object:
|
||||
|
||||
\code
|
||||
QOpenGLBuffer buffer1(QOpenGLBuffer::IndexBuffer);
|
||||
@ -74,16 +74,16 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\enum QOpenGLBuffer::Type
|
||||
This enum defines the type of GL buffer object to create with QOpenGLBuffer.
|
||||
This enum defines the type of OpenGL buffer object to create with QOpenGLBuffer.
|
||||
|
||||
\value VertexBuffer Vertex buffer object for use when specifying
|
||||
vertex arrays.
|
||||
\value IndexBuffer Index buffer object for use with \c{glDrawElements()}.
|
||||
\value PixelPackBuffer Pixel pack buffer object for reading pixel
|
||||
data from the GL server (for example, with \c{glReadPixels()}).
|
||||
data from the OpenGL server (for example, with \c{glReadPixels()}).
|
||||
Not supported under OpenGL/ES.
|
||||
\value PixelUnpackBuffer Pixel unpack buffer object for writing pixel
|
||||
data to the GL server (for example, with \c{glTexImage2D()}).
|
||||
data to the OpenGL server (for example, with \c{glTexImage2D()}).
|
||||
Not supported under OpenGL/ES.
|
||||
*/
|
||||
|
||||
@ -95,26 +95,26 @@ QT_BEGIN_NAMESPACE
|
||||
for drawing operations. Under OpenGL/ES 1.1 this is identical
|
||||
to StaticDraw.
|
||||
\value StreamRead The data will be set once and used a few times
|
||||
for reading data back from the GL server. Not supported
|
||||
for reading data back from the OpenGL server. Not supported
|
||||
under OpenGL/ES.
|
||||
\value StreamCopy The data will be set once and used a few times
|
||||
for reading data back from the GL server for use in further
|
||||
for reading data back from the OpenGL server for use in further
|
||||
drawing operations. Not supported under OpenGL/ES.
|
||||
\value StaticDraw The data will be set once and used many times
|
||||
for drawing operations.
|
||||
\value StaticRead The data will be set once and used many times
|
||||
for reading data back from the GL server. Not supported
|
||||
for reading data back from the OpenGL server. Not supported
|
||||
under OpenGL/ES.
|
||||
\value StaticCopy The data will be set once and used many times
|
||||
for reading data back from the GL server for use in further
|
||||
for reading data back from the OpenGL server for use in further
|
||||
drawing operations. Not supported under OpenGL/ES.
|
||||
\value DynamicDraw The data will be modified repeatedly and used
|
||||
many times for drawing operations.
|
||||
\value DynamicRead The data will be modified repeatedly and used
|
||||
many times for reading data back from the GL server.
|
||||
many times for reading data back from the OpenGL server.
|
||||
Not supported under OpenGL/ES.
|
||||
\value DynamicCopy The data will be modified repeatedly and used
|
||||
many times for reading data back from the GL server for
|
||||
many times for reading data back from the OpenGL server for
|
||||
use in further drawing operations. Not supported under OpenGL/ES.
|
||||
*/
|
||||
|
||||
@ -152,7 +152,7 @@ public:
|
||||
Constructs a new buffer object of type QOpenGLBuffer::VertexBuffer.
|
||||
|
||||
Note: this constructor just creates the QOpenGLBuffer instance. The actual
|
||||
buffer object in the GL server is not created until create() is called.
|
||||
buffer object in the OpenGL server is not created until create() is called.
|
||||
|
||||
\sa create()
|
||||
*/
|
||||
@ -165,7 +165,7 @@ QOpenGLBuffer::QOpenGLBuffer()
|
||||
Constructs a new buffer object of \a type.
|
||||
|
||||
Note: this constructor just creates the QOpenGLBuffer instance. The actual
|
||||
buffer object in the GL server is not created until create() is called.
|
||||
buffer object in the OpenGL server is not created until create() is called.
|
||||
|
||||
\sa create()
|
||||
*/
|
||||
@ -188,7 +188,7 @@ QOpenGLBuffer::QOpenGLBuffer(const QOpenGLBuffer &other)
|
||||
|
||||
/*!
|
||||
Destroys this buffer object, including the storage being
|
||||
used in the GL server.
|
||||
used in the OpenGL server.
|
||||
*/
|
||||
QOpenGLBuffer::~QOpenGLBuffer()
|
||||
{
|
||||
@ -256,14 +256,14 @@ namespace {
|
||||
}
|
||||
|
||||
/*!
|
||||
Creates the buffer object in the GL server. Returns true if
|
||||
Creates the buffer object in the OpenGL server. Returns true if
|
||||
the object was created; false otherwise.
|
||||
|
||||
This function must be called with a current QOpenGLContext.
|
||||
The buffer will be bound to and can only be used in
|
||||
that context (or any other context that is shared with it).
|
||||
|
||||
This function will return false if the GL implementation
|
||||
This function will return false if the OpenGL implementation
|
||||
does not support buffers, or there is no current QOpenGLContext.
|
||||
|
||||
\sa isCreated(), allocate(), write(), destroy()
|
||||
@ -303,7 +303,7 @@ bool QOpenGLBuffer::isCreated() const
|
||||
|
||||
/*!
|
||||
Destroys this buffer object, including the storage being
|
||||
used in the GL server. All references to the buffer will
|
||||
used in the OpenGL server. All references to the buffer will
|
||||
become invalid.
|
||||
*/
|
||||
void QOpenGLBuffer::destroy()
|
||||
@ -398,8 +398,8 @@ void QOpenGLBuffer::allocate(const void *data, int count)
|
||||
|
||||
/*!
|
||||
Binds the buffer associated with this object to the current
|
||||
GL context. Returns false if binding was not possible, usually because
|
||||
type() is not supported on this GL implementation.
|
||||
OpenGL context. Returns false if binding was not possible, usually because
|
||||
type() is not supported on this OpenGL implementation.
|
||||
|
||||
The buffer must be bound to the same QOpenGLContext current when create()
|
||||
was called, or to another QOpenGLContext that is sharing with it.
|
||||
@ -431,7 +431,7 @@ bool QOpenGLBuffer::bind()
|
||||
|
||||
/*!
|
||||
Releases the buffer associated with this object from the
|
||||
current GL context.
|
||||
current OpenGL context.
|
||||
|
||||
This function must be called with the same QOpenGLContext current
|
||||
as when bind() was called on the buffer.
|
||||
@ -470,7 +470,7 @@ void QOpenGLBuffer::release(QOpenGLBuffer::Type type)
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the GL identifier associated with this buffer; zero if
|
||||
Returns the OpenGL identifier associated with this buffer; zero if
|
||||
the buffer has not been created.
|
||||
|
||||
\sa isCreated()
|
||||
|
@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
|
||||
{ \
|
||||
GLenum err = glGetError(); \
|
||||
if (err != GL_NO_ERROR) { \
|
||||
qDebug("[%s line %d] GL Error: %d", \
|
||||
qDebug("[%s line %d] OpenGL Error: %d", \
|
||||
__FILE__, __LINE__, (int)err); \
|
||||
} \
|
||||
}
|
||||
@ -649,13 +649,13 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
|
||||
The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer
|
||||
object, defined by the \c{GL_EXT_framebuffer_object} extension. In
|
||||
addition it provides a rendering surface that can be painted on
|
||||
with a QPainter, rendered to using native GL calls, or both. This
|
||||
surface can be bound and used as a regular texture in your own GL
|
||||
with a QPainter, rendered to using native OpenGL calls, or both. This
|
||||
surface can be bound and used as a regular texture in your own OpenGL
|
||||
drawing code. By default, the QOpenGLFramebufferObject class
|
||||
generates a 2D GL texture (using the \c{GL_TEXTURE_2D} target),
|
||||
generates a 2D OpenGL texture (using the \c{GL_TEXTURE_2D} target),
|
||||
which is used as the internal rendering target.
|
||||
|
||||
\bold{It is important to have a current GL context when creating a
|
||||
\bold{It is important to have a current OpenGL context when creating a
|
||||
QOpenGLFramebufferObject, otherwise initialization will fail.}
|
||||
|
||||
When using a QPainter to paint to a QOpenGLFramebufferObject you should take
|
||||
@ -708,11 +708,11 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
|
||||
|
||||
/*! \fn QOpenGLFramebufferObject::QOpenGLFramebufferObject(const QSize &size, GLenum target)
|
||||
|
||||
Constructs an OpenGL framebuffer object and binds a 2D GL texture
|
||||
Constructs an OpenGL framebuffer object and binds a 2D OpenGL texture
|
||||
to the buffer of the size \a size. The texture is bound to the
|
||||
\c GL_COLOR_ATTACHMENT0 target in the framebuffer object.
|
||||
|
||||
The \a target parameter is used to specify the GL texture
|
||||
The \a target parameter is used to specify the OpenGL texture
|
||||
target. The default target is \c GL_TEXTURE_2D. Keep in mind that
|
||||
\c GL_TEXTURE_2D textures must have a power of 2 width and height
|
||||
(e.g. 256x512), unless you are using OpenGL 2.0 or higher.
|
||||
@ -723,7 +723,7 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
|
||||
The default internal texture format is \c GL_RGBA8 for desktop
|
||||
OpenGL, and \c GL_RGBA for OpenGL/ES.
|
||||
|
||||
It is important that you have a current GL context set when
|
||||
It is important that you have a current OpenGL context set when
|
||||
creating the QOpenGLFramebufferObject, otherwise the initialization
|
||||
will fail.
|
||||
|
||||
@ -739,7 +739,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(const QSize &size, GLenum tar
|
||||
|
||||
/*! \overload
|
||||
|
||||
Constructs an OpenGL framebuffer object and binds a 2D GL texture
|
||||
Constructs an OpenGL framebuffer object and binds a 2D OpenGL texture
|
||||
to the buffer of the given \a width and \a height.
|
||||
|
||||
\sa size(), texture()
|
||||
@ -931,7 +931,7 @@ bool QOpenGLFramebufferObject::release()
|
||||
|
||||
Returns the texture id for the texture attached as the default
|
||||
rendering target in this framebuffer object. This texture id can
|
||||
be bound as a normal texture in your own GL code.
|
||||
be bound as a normal texture in your own OpenGL code.
|
||||
|
||||
If a multisample framebuffer object is used then the value returned
|
||||
from this function will be invalid.
|
||||
@ -1109,7 +1109,7 @@ bool QOpenGLFramebufferObject::hasOpenGLFramebufferObjects()
|
||||
/*!
|
||||
\fn GLuint QOpenGLFramebufferObject::handle() const
|
||||
|
||||
Returns the GL framebuffer object handle for this framebuffer
|
||||
Returns the OpenGL framebuffer object handle for this framebuffer
|
||||
object (returned by the \c{glGenFrameBuffersEXT()} function). This
|
||||
handle can be used to attach new images or buffers to the
|
||||
framebuffer. The user is responsible for cleaning up and
|
||||
|
@ -421,7 +421,7 @@ bool QOpenGLExtensions::hasOpenGLExtension(QOpenGLExtensions::OpenGLExtension ex
|
||||
}
|
||||
|
||||
/*!
|
||||
Initializes GL function resolution for the current context.
|
||||
Initializes OpenGL function resolution for the current context.
|
||||
|
||||
After calling this function, the QOpenGLFunctions object can only be
|
||||
used with the current context and other contexts that share with it.
|
||||
|
@ -63,10 +63,10 @@ QT_BEGIN_NAMESPACE
|
||||
\ingroup painting-3D
|
||||
|
||||
When painting to a QOpenGLPaintDevice using QPainter, the state of
|
||||
the current GL context will be altered by the paint engine to reflect
|
||||
its needs. Applications should not rely upon the GL state being reset
|
||||
the current OpenGL context will be altered by the paint engine to reflect
|
||||
its needs. Applications should not rely upon the OpenGL state being reset
|
||||
to its original conditions, particularly the current shader program,
|
||||
GL viewport, texture units, and drawing modes.
|
||||
OpenGL viewport, texture units, and drawing modes.
|
||||
*/
|
||||
|
||||
class QOpenGLPaintDevicePrivate
|
||||
|
Loading…
Reference in New Issue
Block a user