Replace NULL with nullptr in libkwineffects
Completing the task of replacing all NULL to nullptr in all the files in libkwineffects folder. (also substituting some "0" used as nullptr with nullptr) REVIEW: 114823
This commit is contained in:
parent
3297655fa2
commit
59bb857c7b
10 changed files with 168 additions and 168 deletions
|
@ -233,7 +233,7 @@ public:
|
||||||
|
|
||||||
WindowPaintData::WindowPaintData(EffectWindow* w)
|
WindowPaintData::WindowPaintData(EffectWindow* w)
|
||||||
: PaintData()
|
: PaintData()
|
||||||
, shader(NULL)
|
, shader(nullptr)
|
||||||
, d(new WindowPaintDataPrivate())
|
, d(new WindowPaintDataPrivate())
|
||||||
{
|
{
|
||||||
quads = w->buildQuads();
|
quads = w->buildQuads();
|
||||||
|
@ -492,7 +492,7 @@ void Effect::reconfigure(ReconfigureFlags)
|
||||||
|
|
||||||
void* Effect::proxy()
|
void* Effect::proxy()
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Effect::windowInputMouseEvent(QEvent*)
|
void Effect::windowInputMouseEvent(QEvent*)
|
||||||
|
@ -655,7 +655,7 @@ KConfigGroup EffectsHandler::effectConfig(const QString& effectname)
|
||||||
return kwinconfig->group(QStringLiteral("Effect-") + effectname);
|
return kwinconfig->group(QStringLiteral("Effect-") + effectname);
|
||||||
}
|
}
|
||||||
|
|
||||||
EffectsHandler* effects = 0;
|
EffectsHandler* effects = nullptr;
|
||||||
|
|
||||||
|
|
||||||
//****************************************
|
//****************************************
|
||||||
|
@ -1299,7 +1299,7 @@ bool WindowQuadList::isTransformed() const
|
||||||
PaintClipper
|
PaintClipper
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
|
|
||||||
QStack< QRegion >* PaintClipper::areas = NULL;
|
QStack< QRegion >* PaintClipper::areas = nullptr;
|
||||||
|
|
||||||
PaintClipper::PaintClipper(const QRegion& allowed_area)
|
PaintClipper::PaintClipper(const QRegion& allowed_area)
|
||||||
: area(allowed_area)
|
: area(allowed_area)
|
||||||
|
@ -1316,7 +1316,7 @@ void PaintClipper::push(const QRegion& allowed_area)
|
||||||
{
|
{
|
||||||
if (allowed_area == infiniteRegion()) // don't push these
|
if (allowed_area == infiniteRegion()) // don't push these
|
||||||
return;
|
return;
|
||||||
if (areas == NULL)
|
if (areas == nullptr)
|
||||||
areas = new QStack< QRegion >;
|
areas = new QStack< QRegion >;
|
||||||
areas->push(allowed_area);
|
areas->push(allowed_area);
|
||||||
}
|
}
|
||||||
|
@ -1325,23 +1325,23 @@ void PaintClipper::pop(const QRegion& allowed_area)
|
||||||
{
|
{
|
||||||
if (allowed_area == infiniteRegion())
|
if (allowed_area == infiniteRegion())
|
||||||
return;
|
return;
|
||||||
Q_ASSERT(areas != NULL);
|
Q_ASSERT(areas != nullptr);
|
||||||
Q_ASSERT(areas->top() == allowed_area);
|
Q_ASSERT(areas->top() == allowed_area);
|
||||||
areas->pop();
|
areas->pop();
|
||||||
if (areas->isEmpty()) {
|
if (areas->isEmpty()) {
|
||||||
delete areas;
|
delete areas;
|
||||||
areas = NULL;
|
areas = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PaintClipper::clip()
|
bool PaintClipper::clip()
|
||||||
{
|
{
|
||||||
return areas != NULL;
|
return areas != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRegion PaintClipper::paintArea()
|
QRegion PaintClipper::paintArea()
|
||||||
{
|
{
|
||||||
assert(areas != NULL); // can be called only with clip() == true
|
assert(areas != nullptr); // can be called only with clip() == true
|
||||||
QRegion ret = QRegion(0, 0, displayWidth(), displayHeight());
|
QRegion ret = QRegion(0, 0, displayWidth(), displayHeight());
|
||||||
foreach (const QRegion & r, *areas)
|
foreach (const QRegion & r, *areas)
|
||||||
ret &= r;
|
ret &= r;
|
||||||
|
@ -1670,7 +1670,7 @@ EffectWindow* WindowMotionManager::windowAtPoint(QPoint point, bool useStackingO
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
|
|
|
@ -1527,7 +1527,7 @@ public:
|
||||||
PAINT_DISABLED_BY_ACTIVITY = 1 << 5
|
PAINT_DISABLED_BY_ACTIVITY = 1 << 5
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit EffectWindow(QObject *parent = NULL);
|
explicit EffectWindow(QObject *parent = nullptr);
|
||||||
virtual ~EffectWindow();
|
virtual ~EffectWindow();
|
||||||
|
|
||||||
virtual void enablePainting(int reason) = 0;
|
virtual void enablePainting(int reason) = 0;
|
||||||
|
|
|
@ -46,7 +46,7 @@ class KWINGLUTILS_EXPORT ColorCorrection : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ColorCorrection(QObject *parent = 0);
|
explicit ColorCorrection(QObject *parent = nullptr);
|
||||||
virtual ~ColorCorrection();
|
virtual ~ColorCorrection();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -124,7 +124,7 @@ public:
|
||||||
ColorServerInterface(const QString &service,
|
ColorServerInterface(const QString &service,
|
||||||
const QString &path,
|
const QString &path,
|
||||||
const QDBusConnection &connection,
|
const QDBusConnection &connection,
|
||||||
QObject *parent = 0);
|
QObject *parent = nullptr);
|
||||||
virtual ~ColorServerInterface();
|
virtual ~ColorServerInterface();
|
||||||
|
|
||||||
uint versionInfo() const;
|
uint versionInfo() const;
|
||||||
|
|
|
@ -126,7 +126,7 @@ KWIN_EXPORT Display* display()
|
||||||
inline
|
inline
|
||||||
KWIN_EXPORT xcb_connection_t *connection()
|
KWIN_EXPORT xcb_connection_t *connection()
|
||||||
{
|
{
|
||||||
static xcb_connection_t *s_con = NULL;
|
static xcb_connection_t *s_con = nullptr;
|
||||||
if (!s_con) {
|
if (!s_con) {
|
||||||
s_con = QX11Info::connection();
|
s_con = QX11Info::connection();
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ KWIN_EXPORT xcb_timestamp_t xTime()
|
||||||
inline
|
inline
|
||||||
KWIN_EXPORT xcb_screen_t *defaultScreen()
|
KWIN_EXPORT xcb_screen_t *defaultScreen()
|
||||||
{
|
{
|
||||||
static xcb_screen_t *s_screen = NULL;
|
static xcb_screen_t *s_screen = nullptr;
|
||||||
if (s_screen) {
|
if (s_screen) {
|
||||||
return s_screen;
|
return s_screen;
|
||||||
}
|
}
|
||||||
|
@ -185,17 +185,17 @@ KWIN_EXPORT int displayHeight()
|
||||||
|
|
||||||
#define KWIN_SINGLETON_VARIABLE(ClassName, variableName) \
|
#define KWIN_SINGLETON_VARIABLE(ClassName, variableName) \
|
||||||
public: \
|
public: \
|
||||||
static ClassName *create(QObject *parent = 0);\
|
static ClassName *create(QObject *parent = nullptr);\
|
||||||
static ClassName *self() { return variableName; }\
|
static ClassName *self() { return variableName; }\
|
||||||
protected: \
|
protected: \
|
||||||
explicit ClassName(QObject *parent = 0); \
|
explicit ClassName(QObject *parent = nullptr); \
|
||||||
private: \
|
private: \
|
||||||
static ClassName *variableName;
|
static ClassName *variableName;
|
||||||
|
|
||||||
#define KWIN_SINGLETON(ClassName) KWIN_SINGLETON_VARIABLE(ClassName, s_self)
|
#define KWIN_SINGLETON(ClassName) KWIN_SINGLETON_VARIABLE(ClassName, s_self)
|
||||||
|
|
||||||
#define KWIN_SINGLETON_FACTORY_VARIABLE_FACTORED(ClassName, FactoredClassName, variableName) \
|
#define KWIN_SINGLETON_FACTORY_VARIABLE_FACTORED(ClassName, FactoredClassName, variableName) \
|
||||||
ClassName *ClassName::variableName = 0; \
|
ClassName *ClassName::variableName = nullptr; \
|
||||||
ClassName *ClassName::create(QObject *parent) \
|
ClassName *ClassName::create(QObject *parent) \
|
||||||
{ \
|
{ \
|
||||||
Q_ASSERT(!variableName); \
|
Q_ASSERT(!variableName); \
|
||||||
|
|
|
@ -129,7 +129,7 @@ GLTexturePrivate::GLTexturePrivate()
|
||||||
m_markedDirty = false;
|
m_markedDirty = false;
|
||||||
m_unnormalizeActive = 0;
|
m_unnormalizeActive = 0;
|
||||||
m_normalizeActive = 0;
|
m_normalizeActive = 0;
|
||||||
m_vbo = 0;
|
m_vbo = nullptr;
|
||||||
m_filterChanged = true;
|
m_filterChanged = true;
|
||||||
m_wrapModeChanged = false;
|
m_wrapModeChanged = false;
|
||||||
++s_textureObjectCounter;
|
++s_textureObjectCounter;
|
||||||
|
@ -137,7 +137,7 @@ GLTexturePrivate::GLTexturePrivate()
|
||||||
|
|
||||||
GLTexturePrivate::~GLTexturePrivate()
|
GLTexturePrivate::~GLTexturePrivate()
|
||||||
{
|
{
|
||||||
if (m_vbo != 0) {
|
if (m_vbo != nullptr) {
|
||||||
delete m_vbo;
|
delete m_vbo;
|
||||||
}
|
}
|
||||||
if (m_texture != 0) {
|
if (m_texture != 0) {
|
||||||
|
@ -165,7 +165,7 @@ void GLTexturePrivate::initStatic()
|
||||||
sFramebufferObjectSupported = hasGLExtension(QStringLiteral("GL_EXT_framebuffer_object"));
|
sFramebufferObjectSupported = hasGLExtension(QStringLiteral("GL_EXT_framebuffer_object"));
|
||||||
sSaturationSupported = ((hasGLExtension(QStringLiteral("GL_ARB_texture_env_crossbar"))
|
sSaturationSupported = ((hasGLExtension(QStringLiteral("GL_ARB_texture_env_crossbar"))
|
||||||
&& hasGLExtension(QStringLiteral("GL_ARB_texture_env_dot3"))) || hasGLVersion(1, 4))
|
&& hasGLExtension(QStringLiteral("GL_ARB_texture_env_dot3"))) || hasGLVersion(1, 4))
|
||||||
&& (glTextureUnitsCount >= 4) && glActiveTexture != NULL;
|
&& (glTextureUnitsCount >= 4) && glActiveTexture != nullptr;
|
||||||
sTextureFormat = GL_BGRA;
|
sTextureFormat = GL_BGRA;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,7 +385,7 @@ bool GLShader::compile(GLuint program, GLenum shaderType, const QByteArray &sour
|
||||||
|
|
||||||
QByteArray preparedSource = prepareSource(shaderType, source);
|
QByteArray preparedSource = prepareSource(shaderType, source);
|
||||||
const char* src = preparedSource.constData();
|
const char* src = preparedSource.constData();
|
||||||
glShaderSource(shader, 1, &src, NULL);
|
glShaderSource(shader, 1, &src, nullptr);
|
||||||
|
|
||||||
// Compile the shader
|
// Compile the shader
|
||||||
glCompileShader(shader);
|
glCompileShader(shader);
|
||||||
|
@ -686,7 +686,7 @@ QMatrix4x4 GLShader::getUniformMatrix4x4(const char* name)
|
||||||
//****************************************
|
//****************************************
|
||||||
// ShaderManager
|
// ShaderManager
|
||||||
//****************************************
|
//****************************************
|
||||||
ShaderManager *ShaderManager::s_shaderManager = NULL;
|
ShaderManager *ShaderManager::s_shaderManager = nullptr;
|
||||||
|
|
||||||
ShaderManager *ShaderManager::instance()
|
ShaderManager *ShaderManager::instance()
|
||||||
{
|
{
|
||||||
|
@ -712,7 +712,7 @@ void ShaderManager::disable()
|
||||||
void ShaderManager::cleanup()
|
void ShaderManager::cleanup()
|
||||||
{
|
{
|
||||||
delete s_shaderManager;
|
delete s_shaderManager;
|
||||||
s_shaderManager = NULL;
|
s_shaderManager = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderManager::ShaderManager()
|
ShaderManager::ShaderManager()
|
||||||
|
@ -738,7 +738,7 @@ ShaderManager::~ShaderManager()
|
||||||
GLShader *ShaderManager::getBoundShader() const
|
GLShader *ShaderManager::getBoundShader() const
|
||||||
{
|
{
|
||||||
if (m_boundShaders.isEmpty()) {
|
if (m_boundShaders.isEmpty()) {
|
||||||
return NULL;
|
return nullptr;
|
||||||
} else {
|
} else {
|
||||||
return m_boundShaders.top();
|
return m_boundShaders.top();
|
||||||
}
|
}
|
||||||
|
@ -762,7 +762,7 @@ bool ShaderManager::isShaderDebug() const
|
||||||
GLShader *ShaderManager::pushShader(ShaderType type, bool reset)
|
GLShader *ShaderManager::pushShader(ShaderType type, bool reset)
|
||||||
{
|
{
|
||||||
if (m_inited && !m_valid) {
|
if (m_inited && !m_valid) {
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
pushShader(m_shader[type]);
|
pushShader(m_shader[type]);
|
||||||
|
@ -1451,7 +1451,7 @@ void IndexBuffer::accomodate(int count)
|
||||||
GLuint buffer;
|
GLuint buffer;
|
||||||
glGenBuffers(1, &buffer);
|
glGenBuffers(1, &buffer);
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer);
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer);
|
||||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, size, NULL, GL_STATIC_DRAW);
|
glBufferData(GL_ELEMENT_ARRAY_BUFFER, size, nullptr, GL_STATIC_DRAW);
|
||||||
|
|
||||||
// Use the GPU to copy the data from the old object to the new object,
|
// Use the GPU to copy the data from the old object to the new object,
|
||||||
glBindBuffer(GL_COPY_READ_BUFFER, m_buffer);
|
glBindBuffer(GL_COPY_READ_BUFFER, m_buffer);
|
||||||
|
@ -1628,9 +1628,9 @@ public:
|
||||||
bool GLVertexBufferPrivate::supported = false;
|
bool GLVertexBufferPrivate::supported = false;
|
||||||
bool GLVertexBufferPrivate::hasMapBufferRange = false;
|
bool GLVertexBufferPrivate::hasMapBufferRange = false;
|
||||||
bool GLVertexBufferPrivate::supportsIndexedQuads = false;
|
bool GLVertexBufferPrivate::supportsIndexedQuads = false;
|
||||||
GLVertexBuffer *GLVertexBufferPrivate::streamingBuffer = NULL;
|
GLVertexBuffer *GLVertexBufferPrivate::streamingBuffer = nullptr;
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
IndexBuffer *GLVertexBufferPrivate::s_indexBuffer = NULL;
|
IndexBuffer *GLVertexBufferPrivate::s_indexBuffer = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void GLVertexBufferPrivate::interleaveArrays(float *dst, int dim,
|
void GLVertexBufferPrivate::interleaveArrays(float *dst, int dim,
|
||||||
|
@ -1932,12 +1932,12 @@ void GLVertexBuffer::draw(const QRegion ®ion, GLenum primitiveMode, int first
|
||||||
count = count * 6 / 4;
|
count = count * 6 / 4;
|
||||||
|
|
||||||
if (!hardwareClipping) {
|
if (!hardwareClipping) {
|
||||||
glDrawElementsBaseVertex(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, NULL, first);
|
glDrawElementsBaseVertex(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, nullptr, first);
|
||||||
} else {
|
} else {
|
||||||
// Clip using scissoring
|
// Clip using scissoring
|
||||||
foreach (const QRect &r, region.rects()) {
|
foreach (const QRect &r, region.rects()) {
|
||||||
glScissor(r.x(), displayHeight() - r.y() - r.height(), r.width(), r.height());
|
glScissor(r.x(), displayHeight() - r.y() - r.height(), r.width(), r.height());
|
||||||
glDrawElementsBaseVertex(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, NULL, first);
|
glDrawElementsBaseVertex(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, nullptr, first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1998,7 +1998,7 @@ void GLVertexBuffer::initStatic()
|
||||||
GLVertexBufferPrivate::supported = hasGLVersion(1, 5) || hasGLExtension(QStringLiteral("GL_ARB_vertex_buffer_object"));
|
GLVertexBufferPrivate::supported = hasGLVersion(1, 5) || hasGLExtension(QStringLiteral("GL_ARB_vertex_buffer_object"));
|
||||||
GLVertexBufferPrivate::hasMapBufferRange = hasGLVersion(3, 0) || hasGLExtension(QStringLiteral("GL_ARB_map_buffer_range"));
|
GLVertexBufferPrivate::hasMapBufferRange = hasGLVersion(3, 0) || hasGLExtension(QStringLiteral("GL_ARB_map_buffer_range"));
|
||||||
GLVertexBufferPrivate::supportsIndexedQuads = glMapBufferRange && glCopyBufferSubData && glDrawElementsBaseVertex;
|
GLVertexBufferPrivate::supportsIndexedQuads = glMapBufferRange && glCopyBufferSubData && glDrawElementsBaseVertex;
|
||||||
GLVertexBufferPrivate::s_indexBuffer = 0;
|
GLVertexBufferPrivate::s_indexBuffer = nullptr;
|
||||||
#endif
|
#endif
|
||||||
GLVertexBufferPrivate::streamingBuffer = new GLVertexBuffer(GLVertexBuffer::Stream);
|
GLVertexBufferPrivate::streamingBuffer = new GLVertexBuffer(GLVertexBuffer::Stream);
|
||||||
}
|
}
|
||||||
|
@ -2007,7 +2007,7 @@ void GLVertexBuffer::cleanup()
|
||||||
{
|
{
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
delete GLVertexBufferPrivate::s_indexBuffer;
|
delete GLVertexBufferPrivate::s_indexBuffer;
|
||||||
GLVertexBufferPrivate::s_indexBuffer = 0;
|
GLVertexBufferPrivate::s_indexBuffer = nullptr;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -469,7 +469,7 @@ private:
|
||||||
|
|
||||||
inline
|
inline
|
||||||
ShaderBinder::ShaderBinder(ShaderManager::ShaderType type, bool reset)
|
ShaderBinder::ShaderBinder(ShaderManager::ShaderType type, bool reset)
|
||||||
: m_shader(NULL)
|
: m_shader(nullptr)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_1
|
#ifdef KWIN_HAVE_OPENGL_1
|
||||||
if (!ShaderManager::instance()->isValid()) {
|
if (!ShaderManager::instance()->isValid()) {
|
||||||
|
|
|
@ -208,10 +208,10 @@ glCopyBufferSubData_func glCopyBufferSubData;
|
||||||
|
|
||||||
static glXFuncPtr getProcAddress(const char* name)
|
static glXFuncPtr getProcAddress(const char* name)
|
||||||
{
|
{
|
||||||
glXFuncPtr ret = NULL;
|
glXFuncPtr ret = nullptr;
|
||||||
if (glXGetProcAddress != NULL)
|
if (glXGetProcAddress != nullptr)
|
||||||
ret = glXGetProcAddress((const GLubyte*) name);
|
ret = glXGetProcAddress((const GLubyte*) name);
|
||||||
if (ret == NULL)
|
if (ret == nullptr)
|
||||||
ret = (glXFuncPtr) dlsym(RTLD_DEFAULT, name);
|
ret = (glXFuncPtr) dlsym(RTLD_DEFAULT, name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -220,45 +220,45 @@ void glxResolveFunctions()
|
||||||
{
|
{
|
||||||
// handle OpenGL extensions functions
|
// handle OpenGL extensions functions
|
||||||
glXGetProcAddress = (glXGetProcAddress_func) getProcAddress("glXGetProcAddress");
|
glXGetProcAddress = (glXGetProcAddress_func) getProcAddress("glXGetProcAddress");
|
||||||
if (glXGetProcAddress == NULL)
|
if (glXGetProcAddress == nullptr)
|
||||||
glXGetProcAddress = (glXGetProcAddress_func) getProcAddress("glXGetProcAddressARB");
|
glXGetProcAddress = (glXGetProcAddress_func) getProcAddress("glXGetProcAddressARB");
|
||||||
glXQueryDrawable = (glXQueryDrawable_func) getProcAddress("glXQueryDrawable");
|
glXQueryDrawable = (glXQueryDrawable_func) getProcAddress("glXQueryDrawable");
|
||||||
if (hasGLExtension(QStringLiteral("GLX_EXT_texture_from_pixmap"))) {
|
if (hasGLExtension(QStringLiteral("GLX_EXT_texture_from_pixmap"))) {
|
||||||
glXBindTexImageEXT = (glXBindTexImageEXT_func) getProcAddress("glXBindTexImageEXT");
|
glXBindTexImageEXT = (glXBindTexImageEXT_func) getProcAddress("glXBindTexImageEXT");
|
||||||
glXReleaseTexImageEXT = (glXReleaseTexImageEXT_func) getProcAddress("glXReleaseTexImageEXT");
|
glXReleaseTexImageEXT = (glXReleaseTexImageEXT_func) getProcAddress("glXReleaseTexImageEXT");
|
||||||
} else {
|
} else {
|
||||||
glXBindTexImageEXT = NULL;
|
glXBindTexImageEXT = nullptr;
|
||||||
glXReleaseTexImageEXT = NULL;
|
glXReleaseTexImageEXT = nullptr;
|
||||||
}
|
}
|
||||||
if (hasGLExtension(QStringLiteral("GLX_MESA_copy_sub_buffer")))
|
if (hasGLExtension(QStringLiteral("GLX_MESA_copy_sub_buffer")))
|
||||||
glXCopySubBuffer = (glXCopySubBuffer_func) getProcAddress("glXCopySubBufferMESA");
|
glXCopySubBuffer = (glXCopySubBuffer_func) getProcAddress("glXCopySubBufferMESA");
|
||||||
else
|
else
|
||||||
glXCopySubBuffer = NULL;
|
glXCopySubBuffer = nullptr;
|
||||||
if (hasGLExtension(QStringLiteral("GLX_SGI_video_sync"))) {
|
if (hasGLExtension(QStringLiteral("GLX_SGI_video_sync"))) {
|
||||||
glXGetVideoSync = (glXGetVideoSync_func) getProcAddress("glXGetVideoSyncSGI");
|
glXGetVideoSync = (glXGetVideoSync_func) getProcAddress("glXGetVideoSyncSGI");
|
||||||
glXWaitVideoSync = (glXWaitVideoSync_func) getProcAddress("glXWaitVideoSyncSGI");
|
glXWaitVideoSync = (glXWaitVideoSync_func) getProcAddress("glXWaitVideoSyncSGI");
|
||||||
} else {
|
} else {
|
||||||
glXGetVideoSync = NULL;
|
glXGetVideoSync = nullptr;
|
||||||
glXWaitVideoSync = NULL;
|
glXWaitVideoSync = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLExtension(QStringLiteral("GLX_SGI_swap_control")))
|
if (hasGLExtension(QStringLiteral("GLX_SGI_swap_control")))
|
||||||
glXSwapIntervalSGI = (glXSwapIntervalSGI_func) getProcAddress("glXSwapIntervalSGI");
|
glXSwapIntervalSGI = (glXSwapIntervalSGI_func) getProcAddress("glXSwapIntervalSGI");
|
||||||
else
|
else
|
||||||
glXSwapIntervalSGI = NULL;
|
glXSwapIntervalSGI = nullptr;
|
||||||
if (hasGLExtension(QStringLiteral("GLX_EXT_swap_control")))
|
if (hasGLExtension(QStringLiteral("GLX_EXT_swap_control")))
|
||||||
glXSwapIntervalEXT = (glXSwapIntervalEXT_func) getProcAddress("glXSwapIntervalEXT");
|
glXSwapIntervalEXT = (glXSwapIntervalEXT_func) getProcAddress("glXSwapIntervalEXT");
|
||||||
else
|
else
|
||||||
glXSwapIntervalEXT = NULL;
|
glXSwapIntervalEXT = nullptr;
|
||||||
if (hasGLExtension(QStringLiteral("GLX_MESA_swap_control")))
|
if (hasGLExtension(QStringLiteral("GLX_MESA_swap_control")))
|
||||||
glXSwapIntervalMESA = (glXSwapIntervalMESA_func) getProcAddress("glXSwapIntervalMESA");
|
glXSwapIntervalMESA = (glXSwapIntervalMESA_func) getProcAddress("glXSwapIntervalMESA");
|
||||||
else
|
else
|
||||||
glXSwapIntervalMESA = NULL;
|
glXSwapIntervalMESA = nullptr;
|
||||||
|
|
||||||
if (hasGLExtension(QStringLiteral("GLX_ARB_create_context")))
|
if (hasGLExtension(QStringLiteral("GLX_ARB_create_context")))
|
||||||
glXCreateContextAttribsARB = (glXCreateContextAttribsARB_func) getProcAddress("glXCreateContextAttribsARB");
|
glXCreateContextAttribsARB = (glXCreateContextAttribsARB_func) getProcAddress("glXCreateContextAttribsARB");
|
||||||
else
|
else
|
||||||
glXCreateContextAttribsARB = NULL;
|
glXCreateContextAttribsARB = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -301,14 +301,14 @@ void eglResolveFunctions()
|
||||||
eglCreateImageKHR = (eglCreateImageKHR_func)eglGetProcAddress("eglCreateImageKHR");
|
eglCreateImageKHR = (eglCreateImageKHR_func)eglGetProcAddress("eglCreateImageKHR");
|
||||||
eglDestroyImageKHR = (eglDestroyImageKHR_func)eglGetProcAddress("eglDestroyImageKHR");
|
eglDestroyImageKHR = (eglDestroyImageKHR_func)eglGetProcAddress("eglDestroyImageKHR");
|
||||||
} else {
|
} else {
|
||||||
eglCreateImageKHR = NULL;
|
eglCreateImageKHR = nullptr;
|
||||||
eglDestroyImageKHR = NULL;
|
eglDestroyImageKHR = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLExtension(QStringLiteral("EGL_NV_post_sub_buffer"))) {
|
if (hasGLExtension(QStringLiteral("EGL_NV_post_sub_buffer"))) {
|
||||||
eglPostSubBufferNV = (eglPostSubBufferNV_func)eglGetProcAddress("eglPostSubBufferNV");
|
eglPostSubBufferNV = (eglPostSubBufferNV_func)eglGetProcAddress("eglPostSubBufferNV");
|
||||||
} else {
|
} else {
|
||||||
eglPostSubBufferNV = NULL;
|
eglPostSubBufferNV = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -325,7 +325,7 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
// Get number of texture units
|
// Get number of texture units
|
||||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &glTextureUnitsCount);
|
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &glTextureUnitsCount);
|
||||||
} else {
|
} else {
|
||||||
glActiveTexture = NULL;
|
glActiveTexture = nullptr;
|
||||||
glTextureUnitsCount = 0;
|
glTextureUnitsCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,23 +384,23 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
|
|
||||||
GL_RESOLVE_WITH_EXT(glGenerateMipmap, glGenerateMipmapEXT);
|
GL_RESOLVE_WITH_EXT(glGenerateMipmap, glGenerateMipmapEXT);
|
||||||
} else {
|
} else {
|
||||||
glIsRenderbuffer = NULL;
|
glIsRenderbuffer = nullptr;
|
||||||
glBindRenderbuffer = NULL;
|
glBindRenderbuffer = nullptr;
|
||||||
glDeleteRenderbuffers = NULL;
|
glDeleteRenderbuffers = nullptr;
|
||||||
glGenRenderbuffers = NULL;
|
glGenRenderbuffers = nullptr;
|
||||||
glRenderbufferStorage = NULL;
|
glRenderbufferStorage = nullptr;
|
||||||
glGetRenderbufferParameteriv = NULL;
|
glGetRenderbufferParameteriv = nullptr;
|
||||||
glIsFramebuffer = NULL;
|
glIsFramebuffer = nullptr;
|
||||||
glBindFramebuffer = NULL;
|
glBindFramebuffer = nullptr;
|
||||||
glDeleteFramebuffers = NULL;
|
glDeleteFramebuffers = nullptr;
|
||||||
glGenFramebuffers = NULL;
|
glGenFramebuffers = nullptr;
|
||||||
glCheckFramebufferStatus = NULL;
|
glCheckFramebufferStatus = nullptr;
|
||||||
glFramebufferTexture1D = NULL;
|
glFramebufferTexture1D = nullptr;
|
||||||
glFramebufferTexture2D = NULL;
|
glFramebufferTexture2D = nullptr;
|
||||||
glFramebufferTexture3D = NULL;
|
glFramebufferTexture3D = nullptr;
|
||||||
glFramebufferRenderbuffer = NULL;
|
glFramebufferRenderbuffer = nullptr;
|
||||||
glGetFramebufferAttachmentParameteriv = NULL;
|
glGetFramebufferAttachmentParameteriv = nullptr;
|
||||||
glGenerateMipmap = NULL;
|
glGenerateMipmap = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLVersion(3, 0) || hasGLExtension(QStringLiteral("GL_ARB_framebuffer_object"))) {
|
if (hasGLVersion(3, 0) || hasGLExtension(QStringLiteral("GL_ARB_framebuffer_object"))) {
|
||||||
|
@ -410,7 +410,7 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
// see http://www.opengl.org/registry/specs/EXT/framebuffer_blit.txt
|
// see http://www.opengl.org/registry/specs/EXT/framebuffer_blit.txt
|
||||||
GL_RESOLVE_WITH_EXT(glBlitFramebuffer, glBlitFramebufferEXT);
|
GL_RESOLVE_WITH_EXT(glBlitFramebuffer, glBlitFramebufferEXT);
|
||||||
} else {
|
} else {
|
||||||
glBlitFramebuffer = NULL;
|
glBlitFramebuffer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLVersion(2, 0)) {
|
if (hasGLVersion(2, 0)) {
|
||||||
|
@ -469,32 +469,32 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
GL_RESOLVE_WITH_EXT(glGetUniformLocation, glGetUniformLocationARB);
|
GL_RESOLVE_WITH_EXT(glGetUniformLocation, glGetUniformLocationARB);
|
||||||
GL_RESOLVE_WITH_EXT(glGetUniformfv, glGetUniformfvARB);
|
GL_RESOLVE_WITH_EXT(glGetUniformfv, glGetUniformfvARB);
|
||||||
} else {
|
} else {
|
||||||
glCreateShader = NULL;
|
glCreateShader = nullptr;
|
||||||
glShaderSource = NULL;
|
glShaderSource = nullptr;
|
||||||
glCompileShader = NULL;
|
glCompileShader = nullptr;
|
||||||
glDeleteShader = NULL;
|
glDeleteShader = nullptr;
|
||||||
glCreateProgram = NULL;
|
glCreateProgram = nullptr;
|
||||||
glAttachShader = NULL;
|
glAttachShader = nullptr;
|
||||||
glLinkProgram = NULL;
|
glLinkProgram = nullptr;
|
||||||
glUseProgram = NULL;
|
glUseProgram = nullptr;
|
||||||
glDeleteProgram = NULL;
|
glDeleteProgram = nullptr;
|
||||||
glGetShaderInfoLog = NULL;
|
glGetShaderInfoLog = nullptr;
|
||||||
glGetProgramInfoLog = NULL;
|
glGetProgramInfoLog = nullptr;
|
||||||
glGetProgramiv = NULL;
|
glGetProgramiv = nullptr;
|
||||||
glGetShaderiv = NULL;
|
glGetShaderiv = nullptr;
|
||||||
glUniform1f = NULL;
|
glUniform1f = nullptr;
|
||||||
glUniform2f = NULL;
|
glUniform2f = nullptr;
|
||||||
glUniform3f = NULL;
|
glUniform3f = nullptr;
|
||||||
glUniform4f = NULL;
|
glUniform4f = nullptr;
|
||||||
glUniform1i = NULL;
|
glUniform1i = nullptr;
|
||||||
glUniform1fv = NULL;
|
glUniform1fv = nullptr;
|
||||||
glUniform2fv = NULL;
|
glUniform2fv = nullptr;
|
||||||
glUniform3fv = NULL;
|
glUniform3fv = nullptr;
|
||||||
glUniform4fv = NULL;
|
glUniform4fv = nullptr;
|
||||||
glUniformMatrix4fv = NULL;
|
glUniformMatrix4fv = nullptr;
|
||||||
glValidateProgram = NULL;
|
glValidateProgram = nullptr;
|
||||||
glGetUniformLocation = NULL;
|
glGetUniformLocation = nullptr;
|
||||||
glGetUniformfv = NULL;
|
glGetUniformfv = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLVersion(2, 0)) {
|
if (hasGLVersion(2, 0)) {
|
||||||
|
@ -513,12 +513,12 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
GL_RESOLVE_WITH_EXT(glDisableVertexAttribArray, glDisableVertexAttribArrayARB);
|
GL_RESOLVE_WITH_EXT(glDisableVertexAttribArray, glDisableVertexAttribArrayARB);
|
||||||
GL_RESOLVE_WITH_EXT(glVertexAttribPointer, glVertexAttribPointerARB);
|
GL_RESOLVE_WITH_EXT(glVertexAttribPointer, glVertexAttribPointerARB);
|
||||||
} else {
|
} else {
|
||||||
glVertexAttrib1f = NULL;
|
glVertexAttrib1f = nullptr;
|
||||||
glBindAttribLocation = NULL;
|
glBindAttribLocation = nullptr;
|
||||||
glGetAttribLocation = NULL;
|
glGetAttribLocation = nullptr;
|
||||||
glEnableVertexAttribArray = NULL;
|
glEnableVertexAttribArray = nullptr;
|
||||||
glDisableVertexAttribArray = NULL;
|
glDisableVertexAttribArray = nullptr;
|
||||||
glVertexAttribPointer = NULL;
|
glVertexAttribPointer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLExtension(QStringLiteral("GL_ARB_fragment_program")) && hasGLExtension(QStringLiteral("GL_ARB_vertex_program"))) {
|
if (hasGLExtension(QStringLiteral("GL_ARB_fragment_program")) && hasGLExtension(QStringLiteral("GL_ARB_vertex_program"))) {
|
||||||
|
@ -530,12 +530,12 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
GL_RESOLVE(glProgramLocalParameter4fARB);
|
GL_RESOLVE(glProgramLocalParameter4fARB);
|
||||||
GL_RESOLVE(glGetProgramivARB);
|
GL_RESOLVE(glGetProgramivARB);
|
||||||
} else {
|
} else {
|
||||||
glProgramStringARB = NULL;
|
glProgramStringARB = nullptr;
|
||||||
glBindProgramARB = NULL;
|
glBindProgramARB = nullptr;
|
||||||
glDeleteProgramsARB = NULL;
|
glDeleteProgramsARB = nullptr;
|
||||||
glGenProgramsARB = NULL;
|
glGenProgramsARB = nullptr;
|
||||||
glProgramLocalParameter4fARB = NULL;
|
glProgramLocalParameter4fARB = nullptr;
|
||||||
glGetProgramivARB = NULL;
|
glGetProgramivARB = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLVersion(1, 5)) {
|
if (hasGLVersion(1, 5)) {
|
||||||
|
@ -557,14 +557,14 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
GL_RESOLVE_WITH_EXT(glMapBuffer, glMapBufferARB);
|
GL_RESOLVE_WITH_EXT(glMapBuffer, glMapBufferARB);
|
||||||
GL_RESOLVE_WITH_EXT(glUnmapBuffer, glUnmapBufferARB);
|
GL_RESOLVE_WITH_EXT(glUnmapBuffer, glUnmapBufferARB);
|
||||||
} else {
|
} else {
|
||||||
glGenBuffers = NULL;
|
glGenBuffers = nullptr;
|
||||||
glDeleteBuffers = NULL;
|
glDeleteBuffers = nullptr;
|
||||||
glBindBuffer = NULL;
|
glBindBuffer = nullptr;
|
||||||
glBufferData = NULL;
|
glBufferData = nullptr;
|
||||||
glBufferSubData = NULL;
|
glBufferSubData = nullptr;
|
||||||
glGetBufferSubData = NULL;
|
glGetBufferSubData = nullptr;
|
||||||
glMapBuffer = NULL;
|
glMapBuffer = nullptr;
|
||||||
glUnmapBuffer = NULL;
|
glUnmapBuffer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLVersion(3, 0) || hasGLExtension(QStringLiteral("GL_ARB_vertex_array_object"))) {
|
if (hasGLVersion(3, 0) || hasGLExtension(QStringLiteral("GL_ARB_vertex_array_object"))) {
|
||||||
|
@ -574,10 +574,10 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
GL_RESOLVE(glGenVertexArrays);
|
GL_RESOLVE(glGenVertexArrays);
|
||||||
GL_RESOLVE(glIsVertexArray);
|
GL_RESOLVE(glIsVertexArray);
|
||||||
} else {
|
} else {
|
||||||
glBindVertexArray = NULL;
|
glBindVertexArray = nullptr;
|
||||||
glDeleteVertexArrays = NULL;
|
glDeleteVertexArrays = nullptr;
|
||||||
glGenVertexArrays = NULL;
|
glGenVertexArrays = nullptr;
|
||||||
glIsVertexArray = NULL;
|
glIsVertexArray = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLVersion(3, 0)) {
|
if (hasGLVersion(3, 0)) {
|
||||||
|
@ -650,39 +650,39 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
GL_RESOLVE_WITH_EXT(glUniform2uiv, glUniform2uivEXT);
|
GL_RESOLVE_WITH_EXT(glUniform2uiv, glUniform2uivEXT);
|
||||||
GL_RESOLVE_WITH_EXT(glUniform3uiv, glUniform3uivEXT);
|
GL_RESOLVE_WITH_EXT(glUniform3uiv, glUniform3uivEXT);
|
||||||
} else {
|
} else {
|
||||||
glVertexAttribI1i = NULL;
|
glVertexAttribI1i = nullptr;
|
||||||
glVertexAttribI2i = NULL;
|
glVertexAttribI2i = nullptr;
|
||||||
glVertexAttribI3i = NULL;
|
glVertexAttribI3i = nullptr;
|
||||||
glVertexAttribI4i = NULL;
|
glVertexAttribI4i = nullptr;
|
||||||
glVertexAttribI1ui = NULL;
|
glVertexAttribI1ui = nullptr;
|
||||||
glVertexAttribI2ui = NULL;
|
glVertexAttribI2ui = nullptr;
|
||||||
glVertexAttribI3ui = NULL;
|
glVertexAttribI3ui = nullptr;
|
||||||
glVertexAttribI4ui = NULL;
|
glVertexAttribI4ui = nullptr;
|
||||||
glVertexAttribI1iv = NULL;
|
glVertexAttribI1iv = nullptr;
|
||||||
glVertexAttribI2iv = NULL;
|
glVertexAttribI2iv = nullptr;
|
||||||
glVertexAttribI3iv = NULL;
|
glVertexAttribI3iv = nullptr;
|
||||||
glVertexAttribI4iv = NULL;
|
glVertexAttribI4iv = nullptr;
|
||||||
glVertexAttribI1uiv = NULL;
|
glVertexAttribI1uiv = nullptr;
|
||||||
glVertexAttribI2uiv = NULL;
|
glVertexAttribI2uiv = nullptr;
|
||||||
glVertexAttribI3uiv = NULL;
|
glVertexAttribI3uiv = nullptr;
|
||||||
glVertexAttribI4uiv = NULL;
|
glVertexAttribI4uiv = nullptr;
|
||||||
glVertexAttribI4bv = NULL;
|
glVertexAttribI4bv = nullptr;
|
||||||
glVertexAttribI4sv = NULL;
|
glVertexAttribI4sv = nullptr;
|
||||||
glVertexAttribI4ubv = NULL;
|
glVertexAttribI4ubv = nullptr;
|
||||||
glVertexAttribI4usv = NULL;
|
glVertexAttribI4usv = nullptr;
|
||||||
glVertexAttribIPointer = NULL;
|
glVertexAttribIPointer = nullptr;
|
||||||
glGetVertexAttribIiv = NULL;
|
glGetVertexAttribIiv = nullptr;
|
||||||
glGetVertexAttribIuiv = NULL;
|
glGetVertexAttribIuiv = nullptr;
|
||||||
glGetUniformuiv = NULL;
|
glGetUniformuiv = nullptr;
|
||||||
glBindFragDataLocation = NULL;
|
glBindFragDataLocation = nullptr;
|
||||||
glGetFragDataLocation = NULL;
|
glGetFragDataLocation = nullptr;
|
||||||
glUniform1ui = NULL;
|
glUniform1ui = nullptr;
|
||||||
glUniform2ui = NULL;
|
glUniform2ui = nullptr;
|
||||||
glUniform3ui = NULL;
|
glUniform3ui = nullptr;
|
||||||
glUniform4ui = NULL;
|
glUniform4ui = nullptr;
|
||||||
glUniform1uiv = NULL;
|
glUniform1uiv = nullptr;
|
||||||
glUniform2uiv = NULL;
|
glUniform2uiv = nullptr;
|
||||||
glUniform3uiv = NULL;
|
glUniform3uiv = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLVersion(3, 0) || hasGLExtension(QStringLiteral("GL_ARB_map_buffer_range"))) {
|
if (hasGLVersion(3, 0) || hasGLExtension(QStringLiteral("GL_ARB_map_buffer_range"))) {
|
||||||
|
@ -690,8 +690,8 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
GL_RESOLVE(glMapBufferRange);
|
GL_RESOLVE(glMapBufferRange);
|
||||||
GL_RESOLVE(glFlushMappedBufferRange);
|
GL_RESOLVE(glFlushMappedBufferRange);
|
||||||
} else {
|
} else {
|
||||||
glMapBufferRange = NULL;
|
glMapBufferRange = nullptr;
|
||||||
glFlushMappedBufferRange = NULL;
|
glFlushMappedBufferRange = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLExtension(QStringLiteral("GL_ARB_robustness"))) {
|
if (hasGLExtension(QStringLiteral("GL_ARB_robustness"))) {
|
||||||
|
@ -710,15 +710,15 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
GL_RESOLVE(glDrawElementsBaseVertex);
|
GL_RESOLVE(glDrawElementsBaseVertex);
|
||||||
GL_RESOLVE(glDrawElementsInstancedBaseVertex);
|
GL_RESOLVE(glDrawElementsInstancedBaseVertex);
|
||||||
} else {
|
} else {
|
||||||
glDrawElementsBaseVertex = NULL;
|
glDrawElementsBaseVertex = nullptr;
|
||||||
glDrawElementsInstancedBaseVertex = NULL;
|
glDrawElementsInstancedBaseVertex = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLVersion(3, 1) || hasGLExtension(QStringLiteral("GL_ARB_copy_buffer"))) {
|
if (hasGLVersion(3, 1) || hasGLExtension(QStringLiteral("GL_ARB_copy_buffer"))) {
|
||||||
// See http://www.opengl.org/registry/specs/ARB/copy_buffer.txt
|
// See http://www.opengl.org/registry/specs/ARB/copy_buffer.txt
|
||||||
GL_RESOLVE(glCopyBufferSubData);
|
GL_RESOLVE(glCopyBufferSubData);
|
||||||
} else {
|
} else {
|
||||||
glCopyBufferSubData = NULL;
|
glCopyBufferSubData = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -729,15 +729,15 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
glUnmapBuffer = (glUnmapBuffer_func) eglGetProcAddress("glUnmapBufferOES");
|
glUnmapBuffer = (glUnmapBuffer_func) eglGetProcAddress("glUnmapBufferOES");
|
||||||
glGetBufferPointerv = (glGetBufferPointerv_func) eglGetProcAddress("glGetBufferPointervOES");
|
glGetBufferPointerv = (glGetBufferPointerv_func) eglGetProcAddress("glGetBufferPointervOES");
|
||||||
} else {
|
} else {
|
||||||
glMapBuffer = NULL;
|
glMapBuffer = nullptr;
|
||||||
glUnmapBuffer = NULL;
|
glUnmapBuffer = nullptr;
|
||||||
glGetBufferPointerv = NULL;
|
glGetBufferPointerv = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLExtension(QStringLiteral("GL_OES_texture_3D"))) {
|
if (hasGLExtension(QStringLiteral("GL_OES_texture_3D"))) {
|
||||||
glTexImage3D = (glTexImage3DOES_func)eglGetProcAddress("glTexImage3DOES");
|
glTexImage3D = (glTexImage3DOES_func)eglGetProcAddress("glTexImage3DOES");
|
||||||
} else {
|
} else {
|
||||||
glTexImage3D = NULL;
|
glTexImage3D = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLExtension(QStringLiteral("GL_EXT_map_buffer_range"))) {
|
if (hasGLExtension(QStringLiteral("GL_EXT_map_buffer_range"))) {
|
||||||
|
@ -745,8 +745,8 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
glMapBufferRange = (glMapBufferRange_func) eglGetProcAddress("glMapBufferRangeEXT");
|
glMapBufferRange = (glMapBufferRange_func) eglGetProcAddress("glMapBufferRangeEXT");
|
||||||
glFlushMappedBufferRange = (glFlushMappedBufferRange_func) eglGetProcAddress("glFlushMappedBufferRangeEXT");
|
glFlushMappedBufferRange = (glFlushMappedBufferRange_func) eglGetProcAddress("glFlushMappedBufferRangeEXT");
|
||||||
} else {
|
} else {
|
||||||
glMapBufferRange = NULL;
|
glMapBufferRange = nullptr;
|
||||||
glFlushMappedBufferRange = NULL;
|
glFlushMappedBufferRange = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasGLExtension(QStringLiteral("GL_EXT_robustness"))) {
|
if (hasGLExtension(QStringLiteral("GL_EXT_robustness"))) {
|
||||||
|
@ -767,7 +767,7 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface)
|
||||||
if (hasGLExtension(QStringLiteral("GL_OES_EGL_image"))) {
|
if (hasGLExtension(QStringLiteral("GL_OES_EGL_image"))) {
|
||||||
glEGLImageTargetTexture2DOES = (glEGLImageTargetTexture2DOES_func)eglGetProcAddress("glEGLImageTargetTexture2DOES");
|
glEGLImageTargetTexture2DOES = (glEGLImageTargetTexture2DOES_func)eglGetProcAddress("glEGLImageTargetTexture2DOES");
|
||||||
} else {
|
} else {
|
||||||
glEGLImageTargetTexture2DOES = NULL;
|
glEGLImageTargetTexture2DOES = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -82,7 +82,7 @@ static xcb_render_picture_t createPicture(xcb_pixmap_t pix, int depth)
|
||||||
return XCB_RENDER_PICTURE_NONE;
|
return XCB_RENDER_PICTURE_NONE;
|
||||||
static QHash<int, xcb_render_pictformat_t> s_renderFormats;
|
static QHash<int, xcb_render_pictformat_t> s_renderFormats;
|
||||||
if (!s_renderFormats.contains(depth)) {
|
if (!s_renderFormats.contains(depth)) {
|
||||||
xcb_render_query_pict_formats_reply_t *formats = xcb_render_query_pict_formats_reply(connection(), xcb_render_query_pict_formats_unchecked(connection()), NULL);
|
xcb_render_query_pict_formats_reply_t *formats = xcb_render_query_pict_formats_reply(connection(), xcb_render_query_pict_formats_unchecked(connection()), nullptr);
|
||||||
if (!formats) {
|
if (!formats) {
|
||||||
return XCB_RENDER_PICTURE_NONE;
|
return XCB_RENDER_PICTURE_NONE;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ static xcb_render_picture_t createPicture(xcb_pixmap_t pix, int depth)
|
||||||
return XCB_RENDER_PICTURE_NONE;
|
return XCB_RENDER_PICTURE_NONE;
|
||||||
}
|
}
|
||||||
xcb_render_picture_t pic = xcb_generate_id(connection());
|
xcb_render_picture_t pic = xcb_generate_id(connection());
|
||||||
xcb_render_create_picture(connection(), pic, pix, it.value(), 0, NULL);
|
xcb_render_create_picture(connection(), pic, pix, it.value(), 0, nullptr);
|
||||||
return pic;
|
return pic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ void XRenderPicture::fromImage(const QImage &img)
|
||||||
xcb_create_pixmap(connection(), depth, xpix, rootWindow(), img.width(), img.height());
|
xcb_create_pixmap(connection(), depth, xpix, rootWindow(), img.width(), img.height());
|
||||||
|
|
||||||
xcb_gcontext_t cid = xcb_generate_id(connection());
|
xcb_gcontext_t cid = xcb_generate_id(connection());
|
||||||
xcb_create_gc(connection(), cid, xpix, 0, NULL);
|
xcb_create_gc(connection(), cid, xpix, 0, nullptr);
|
||||||
xcb_put_image(connection(), XCB_IMAGE_FORMAT_Z_PIXMAP, xpix, cid, img.width(), img.height(),
|
xcb_put_image(connection(), XCB_IMAGE_FORMAT_Z_PIXMAP, xpix, cid, img.width(), img.height(),
|
||||||
0, 0, 0, depth, img.byteCount(), img.constBits());
|
0, 0, 0, depth, img.byteCount(), img.constBits());
|
||||||
xcb_free_gc(connection(), cid);
|
xcb_free_gc(connection(), cid);
|
||||||
|
@ -143,7 +143,7 @@ void scene_setXRenderOffscreenTarget(xcb_render_picture_t pix)
|
||||||
|
|
||||||
XRenderPicture *scene_xRenderOffscreenTarget()
|
XRenderPicture *scene_xRenderOffscreenTarget()
|
||||||
{
|
{
|
||||||
return s_scene_offscreenTargetStack.isEmpty() ? 0 : s_scene_offscreenTargetStack.top();
|
return s_scene_offscreenTargetStack.isEmpty() ? nullptr : s_scene_offscreenTargetStack.top();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setXRenderOffscreen(bool b)
|
void setXRenderOffscreen(bool b)
|
||||||
|
|
Loading…
Reference in a new issue