summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h4
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h2
-rw-r--r--src/opengl/qgl.cpp4
-rw-r--r--src/opengl/qgl_p.h12
-rw-r--r--src/opengl/qglcolormap.cpp2
-rw-r--r--src/opengl/qglcolormap.h2
-rw-r--r--src/opengl/qglframebufferobject.cpp2
-rw-r--r--src/opengl/qglframebufferobject_p.h6
-rw-r--r--src/opengl/qglpixelbuffer_p.h2
-rw-r--r--src/opengl/qgraphicsshadereffect_p.h2
11 files changed, 20 insertions, 20 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index ec472da2e8..d23b3ad550 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -372,7 +372,7 @@ private:
class QGLEngineShaderProg
{
public:
- QGLEngineShaderProg() : program(0) {}
+ QGLEngineShaderProg() : program(nullptr) {}
~QGLEngineShaderProg() {
if (program)
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index abf5b8ea48..762aac2f65 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -175,9 +175,9 @@ public:
QGL2PaintEngineExPrivate(QGL2PaintEngineEx *q_ptr) :
q(q_ptr),
- shaderManager(0),
+ shaderManager(nullptr),
width(0), height(0),
- ctx(0),
+ ctx(nullptr),
useSystemClip(true),
elementIndicesVBOId(0),
opacityArray(0),
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index e76216ef5d..7c12ce8998 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -139,7 +139,7 @@ public:
inline void setPaintEnginePrivate(QGL2PaintEngineExPrivate *p) { pex = p; }
- inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : 0; }
+ inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : nullptr; }
inline int serialNumber() const { return m_serialNumber; }
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 799e984a68..2b4af3ef9f 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -397,7 +397,7 @@ QGLFormat::QGLFormat(QGL::FormatOptions options, int plane)
*/
void QGLFormat::detach()
{
- if (d->ref.load() != 1) {
+ if (d->ref.loadRelaxed() != 1) {
QGLFormatPrivate *newd = new QGLFormatPrivate(d);
if (!d->ref.deref())
delete d;
@@ -5208,7 +5208,7 @@ void QGLContextGroup::addShare(const QGLContext *context, const QGLContext *shar
return;
// Make sure 'context' is not already shared with another group of contexts.
- Q_ASSERT(context->d_ptr->group->m_refs.load() == 1);
+ Q_ASSERT(context->d_ptr->group->m_refs.loadRelaxed() == 1);
// Free 'context' group resources and make it use the same resources as 'share'.
QGLContextGroup *group = share->d_ptr->group;
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index ed364283cc..4e52c0f5e9 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -203,7 +203,7 @@ const QGLContext *qt_gl_transfer_context(const QGLContext *);
class QGLTemporaryContextPrivate;
class QGLTemporaryContext {
public:
- explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = 0);
+ explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = nullptr);
~QGLTemporaryContext();
private:
@@ -302,7 +302,7 @@ class Q_OPENGL_EXPORT QGLShareContextScope
{
public:
QGLShareContextScope(const QGLContext *ctx)
- : m_oldContext(0)
+ : m_oldContext(nullptr)
{
QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext());
if (currentContext != ctx && !QGLContext::areSharing(ctx, currentContext)) {
@@ -367,7 +367,7 @@ Q_SIGNALS:
class QGLTexture {
public:
- explicit QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D,
+ explicit QGLTexture(QGLContext *ctx = nullptr, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D,
QGLContext::BindOptions opt = QGLContext::DefaultBindOption)
: context(ctx),
id(tx_id),
@@ -378,7 +378,7 @@ public:
~QGLTexture() {
if (options & QGLContext::MemoryManagedBindOption) {
Q_ASSERT(context);
- QPlatformPixmap *boundPixmap = 0;
+ QPlatformPixmap *boundPixmap = nullptr;
context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id);
}
}
@@ -392,9 +392,9 @@ public:
bool canBindCompressedTexture
(const char *buf, int len, const char *format, bool *hasAlpha);
QSize bindCompressedTexture
- (const QString& fileName, const char *format = 0);
+ (const QString& fileName, const char *format = nullptr);
QSize bindCompressedTexture
- (const char *buf, int len, const char *format = 0);
+ (const char *buf, int len, const char *format = nullptr);
QSize bindCompressedTextureDDS(const char *buf, int len);
QSize bindCompressedTexturePVR(const char *buf, int len);
};
diff --git a/src/opengl/qglcolormap.cpp b/src/opengl/qglcolormap.cpp
index d607363ac0..f314a9715d 100644
--- a/src/opengl/qglcolormap.cpp
+++ b/src/opengl/qglcolormap.cpp
@@ -153,7 +153,7 @@ QGLColormap & QGLColormap::operator=(const QGLColormap &map)
void QGLColormap::detach_helper()
{
QGLColormapData *x = new QGLColormapData;
- x->ref.store(1);
+ x->ref.storeRelaxed(1);
x->cmapHandle = 0;
x->cells = 0;
if (d->cells) {
diff --git a/src/opengl/qglcolormap.h b/src/opengl/qglcolormap.h
index 772e327e34..b59b56e040 100644
--- a/src/opengl/qglcolormap.h
+++ b/src/opengl/qglcolormap.h
@@ -90,7 +90,7 @@ private:
inline void QGLColormap::detach()
{
- if (d->ref.load() != 1)
+ if (d->ref.loadRelaxed() != 1)
detach_helper();
}
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index b2158ebfaa..d0f82a85fa 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -145,7 +145,7 @@ extern QImage qt_gl_read_frame_buffer(const QSize&, bool, bool);
*/
void QGLFramebufferObjectFormat::detach()
{
- if (d->ref.load() != 1) {
+ if (d->ref.loadRelaxed() != 1) {
QGLFramebufferObjectFormatPrivate *newd
= new QGLFramebufferObjectFormatPrivate(d);
if (!d->ref.deref())
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index bf5e21cf0b..9d536527c3 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -124,9 +124,9 @@ private:
class QGLFramebufferObjectPrivate
{
public:
- QGLFramebufferObjectPrivate() : fbo_guard(0), texture_guard(0), depth_buffer_guard(0)
- , stencil_buffer_guard(0), color_buffer_guard(0)
- , valid(false), engine(0) {}
+ QGLFramebufferObjectPrivate() : fbo_guard(nullptr), texture_guard(nullptr), depth_buffer_guard(nullptr)
+ , stencil_buffer_guard(nullptr), color_buffer_guard(nullptr)
+ , valid(false), engine(nullptr) {}
~QGLFramebufferObjectPrivate() {}
void init(QGLFramebufferObject *q, const QSize& sz,
diff --git a/src/opengl/qglpixelbuffer_p.h b/src/opengl/qglpixelbuffer_p.h
index 9125fcfb4b..2729ade2b6 100644
--- a/src/opengl/qglpixelbuffer_p.h
+++ b/src/opengl/qglpixelbuffer_p.h
@@ -77,7 +77,7 @@ private:
class QGLPixelBufferPrivate {
Q_DECLARE_PUBLIC(QGLPixelBuffer)
public:
- QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(0), widget(0), fbo(0), blit_fbo(0), pbuf(0), ctx(0)
+ QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(nullptr), widget(nullptr), fbo(nullptr), blit_fbo(nullptr), pbuf(nullptr), ctx(nullptr)
{
}
bool init(const QSize &size, const QGLFormat &f, QGLWidget *shareWidget);
diff --git a/src/opengl/qgraphicsshadereffect_p.h b/src/opengl/qgraphicsshadereffect_p.h
index 1a32f24d70..218caa2936 100644
--- a/src/opengl/qgraphicsshadereffect_p.h
+++ b/src/opengl/qgraphicsshadereffect_p.h
@@ -67,7 +67,7 @@ class Q_OPENGL_EXPORT QGraphicsShaderEffect : public QGraphicsEffect
{
Q_OBJECT
public:
- QGraphicsShaderEffect(QObject *parent = 0);
+ QGraphicsShaderEffect(QObject *parent = nullptr);
virtual ~QGraphicsShaderEffect();
QByteArray pixelShaderFragment() const;