From: Ivailo Monev Date: Wed, 21 Sep 2016 03:16:07 +0000 (+0000) Subject: mac and win leftovers removal from opengl component X-Git-Tag: 4.12.0~6681 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=92c22b71bf47a9aa55e49aa61efe4378d0f8a094;p=kde%2FKatie.git mac and win leftovers removal from opengl component Signed-off-by: Ivailo Monev --- diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 8f37a80ec..efc50625a 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2698,31 +2698,6 @@ GLuint QGLContext::bindTexture(const QImage &image, GLenum target, GLint format, return texture->id; } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -GLuint QGLContext::bindTexture(const QImage &image, QMacCompatGLenum target, QMacCompatGLint format) -{ - if (image.isNull()) - return 0; - - Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), DefaultBindOption); - return texture->id; -} - -/*! \internal */ -GLuint QGLContext::bindTexture(const QImage &image, QMacCompatGLenum target, QMacCompatGLint format, - BindOptions options) -{ - if (image.isNull()) - return 0; - - Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), options); - return texture->id; -} -#endif - /*! \overload Generates and binds a 2D GL texture based on \a pixmap. @@ -2754,30 +2729,6 @@ GLuint QGLContext::bindTexture(const QPixmap &pixmap, GLenum target, GLint forma return texture->id; } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -GLuint QGLContext::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, QMacCompatGLint format) -{ - if (pixmap.isNull()) - return 0; - - Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(pixmap, GLenum(target), GLint(format), DefaultBindOption); - return texture->id; -} -/*! \internal */ -GLuint QGLContext::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, QMacCompatGLint format, - BindOptions options) -{ - if (pixmap.isNull()) - return 0; - - Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(pixmap, GLenum(target), GLint(format), options); - return texture->id; -} -#endif - /*! Removes the texture identified by \a id from the texture cache, and calls glDeleteTextures() to delete the texture from the @@ -2792,14 +2743,6 @@ void QGLContext::deleteTexture(GLuint id) glDeleteTextures(1, &id); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLContext::deleteTexture(QMacCompatGLuint id) -{ - return deleteTexture(GLuint(id)); -} -#endif - void qt_add_rect_to_array(const QRectF &r, GLfloat *array) { qreal left = r.left(); @@ -2939,14 +2882,6 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text #endif } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLContext::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) -{ - drawTexture(target, GLuint(textureId), GLenum(textureTarget)); -} -#endif - /*! \since 4.4 @@ -3010,15 +2945,6 @@ void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum text #endif } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLContext::drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) -{ - drawTexture(point, GLuint(textureId), GLenum(textureTarget)); -} -#endif - - /*! This function sets the limit for the texture cache to \a size, expressed in kilobytes. @@ -4149,7 +4075,6 @@ void QGLWidget::resizeOverlayGL(int, int) /*! \fn bool QGLWidget::event(QEvent *e) \reimp */ -#if !defined(Q_OS_WINCE) bool QGLWidget::event(QEvent *e) { Q_D(QGLWidget); @@ -4196,7 +4121,6 @@ bool QGLWidget::event(QEvent *e) return QWidget::event(e); } -#endif /*! \fn void QGLWidget::paintEvent(QPaintEvent *event) @@ -4930,29 +4854,6 @@ GLuint QGLWidget::bindTexture(const QImage &image, GLenum target, GLint format, return d->glcx->bindTexture(image, target, format, options); } - -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -GLuint QGLWidget::bindTexture(const QImage &image, QMacCompatGLenum target, QMacCompatGLint format) -{ - if (image.isNull()) - return 0; - - Q_D(QGLWidget); - return d->glcx->bindTexture(image, GLenum(target), GLint(format), QGLContext::DefaultBindOption); -} - -GLuint QGLWidget::bindTexture(const QImage &image, QMacCompatGLenum target, QMacCompatGLint format, - QGLContext::BindOptions options) -{ - if (image.isNull()) - return 0; - - Q_D(QGLWidget); - return d->glcx->bindTexture(image, GLenum(target), GLint(format), options); -} -#endif - /*! Calls QGLContext:::bindTexture(\a pixmap, \a target, \a format) on the currently set context. @@ -4985,23 +4886,6 @@ GLuint QGLWidget::bindTexture(const QPixmap &pixmap, GLenum target, GLint format return d->glcx->bindTexture(pixmap, target, format, options); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -GLuint QGLWidget::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, QMacCompatGLint format) -{ - Q_D(QGLWidget); - return d->glcx->bindTexture(pixmap, target, format, QGLContext::DefaultBindOption); -} - -GLuint QGLWidget::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, QMacCompatGLint format, - QGLContext::BindOptions options) -{ - Q_D(QGLWidget); - return d->glcx->bindTexture(pixmap, target, format, options); -} -#endif - - /*! \overload Calls QGLContext::bindTexture(\a fileName) on the currently set context. @@ -5026,15 +4910,6 @@ void QGLWidget::deleteTexture(GLuint id) d->glcx->deleteTexture(id); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLWidget::deleteTexture(QMacCompatGLuint id) -{ - Q_D(QGLWidget); - d->glcx->deleteTexture(GLuint(id)); -} -#endif - /*! \since 4.4 @@ -5048,15 +4923,6 @@ void QGLWidget::drawTexture(const QRectF &target, GLuint textureId, GLenum textu d->glcx->drawTexture(target, textureId, textureTarget); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLWidget::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) -{ - Q_D(QGLWidget); - d->glcx->drawTexture(target, GLint(textureId), GLenum(textureTarget)); -} -#endif - /*! \since 4.4 @@ -5070,15 +4936,6 @@ void QGLWidget::drawTexture(const QPointF &point, GLuint textureId, GLenum textu d->glcx->drawTexture(point, textureId, textureTarget); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLWidget::drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) -{ - Q_D(QGLWidget); - d->glcx->drawTexture(point, GLuint(textureId), GLenum(textureTarget)); -} -#endif - #ifndef QT_OPENGL_ES_1 Q_GLOBAL_STATIC(QGLEngineThreadStorage, qt_gl_2_engine) #endif diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 2d0c86d04..2abdc4d37 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -51,11 +51,7 @@ QT_BEGIN_HEADER #if defined(QT_OPENGL_ES_1) -# if defined(Q_OS_MAC) -# include -# else -# include -# endif +# include # ifndef GL_DOUBLE # define GL_DOUBLE GL_FLOAT # endif @@ -63,11 +59,7 @@ QT_BEGIN_HEADER typedef GLfloat GLdouble; # endif #elif defined(QT_OPENGL_ES_2) -# if defined(Q_OS_MAC) -# include -# else -# include -# endif +# include # ifndef GL_DOUBLE # define GL_DOUBLE GL_FLOAT # endif @@ -313,22 +305,6 @@ public: void drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget = GL_TEXTURE_2D); void drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget = GL_TEXTURE_2D); -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS - GLuint bindTexture(const QImage &image, QMacCompatGLenum = GL_TEXTURE_2D, - QMacCompatGLint format = GL_RGBA); - GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum = GL_TEXTURE_2D, - QMacCompatGLint format = GL_RGBA); - GLuint bindTexture(const QImage &image, QMacCompatGLenum, QMacCompatGLint format, - BindOptions); - GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum, QMacCompatGLint format, - BindOptions); - - void deleteTexture(QMacCompatGLuint tx_id); - - void drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget = GL_TEXTURE_2D); - void drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget = GL_TEXTURE_2D); -#endif - static void setTextureCacheLimit(int size); static int textureCacheLimit(); @@ -467,22 +443,6 @@ public: void drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget = GL_TEXTURE_2D); void drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget = GL_TEXTURE_2D); -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS - GLuint bindTexture(const QImage &image, QMacCompatGLenum = GL_TEXTURE_2D, - QMacCompatGLint format = GL_RGBA); - GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum = GL_TEXTURE_2D, - QMacCompatGLint format = GL_RGBA); - GLuint bindTexture(const QImage &image, QMacCompatGLenum, QMacCompatGLint format, - QGLContext::BindOptions); - GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum, QMacCompatGLint format, - QGLContext::BindOptions); - - void deleteTexture(QMacCompatGLuint tx_id); - - void drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget = GL_TEXTURE_2D); - void drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget = GL_TEXTURE_2D); -#endif - public Q_SLOTS: virtual void updateGL(); virtual void updateOverlayGL(); diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 00e8c55a0..235e964f6 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -307,22 +307,6 @@ GLenum QGLFramebufferObjectFormat::internalTextureFormat() const return d->internal_format; } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLFramebufferObjectFormat::setTextureTarget(QMacCompatGLenum target) -{ - detach(); - d->target = target; -} - -/*! \internal */ -void QGLFramebufferObjectFormat::setInternalTextureFormat(QMacCompatGLenum internalTextureFormat) -{ - detach(); - d->internal_format = internalTextureFormat; -} -#endif - /*! Returns true if all the options of this framebuffer object format are the same as \a other; otherwise returns false. @@ -781,16 +765,6 @@ QGLFramebufferObject::QGLFramebufferObject(const QSize &size, GLenum target) d->init(this, size, NoAttachment, target, DEFAULT_FORMAT); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -QGLFramebufferObject::QGLFramebufferObject(const QSize &size, QMacCompatGLenum target) - : d_ptr(new QGLFramebufferObjectPrivate) -{ - Q_D(QGLFramebufferObject); - d->init(this, size, NoAttachment, target, DEFAULT_FORMAT); -} -#endif - /*! \overload Constructs an OpenGL framebuffer object and binds a 2D GL texture @@ -833,16 +807,6 @@ QGLFramebufferObject::QGLFramebufferObject(int width, int height, const QGLFrame format.internalTextureFormat(), format.samples(), format.mipmap()); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -QGLFramebufferObject::QGLFramebufferObject(int width, int height, QMacCompatGLenum target) - : d_ptr(new QGLFramebufferObjectPrivate) -{ - Q_D(QGLFramebufferObject); - d->init(this, QSize(width, height), NoAttachment, target, DEFAULT_FORMAT); -} -#endif - /*! \overload Constructs an OpenGL framebuffer object and binds a texture to the @@ -864,17 +828,6 @@ QGLFramebufferObject::QGLFramebufferObject(int width, int height, Attachment att d->init(this, QSize(width, height), attachment, target, internal_format); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -QGLFramebufferObject::QGLFramebufferObject(int width, int height, Attachment attachment, - QMacCompatGLenum target, QMacCompatGLenum internal_format) - : d_ptr(new QGLFramebufferObjectPrivate) -{ - Q_D(QGLFramebufferObject); - d->init(this, QSize(width, height), attachment, target, internal_format); -} -#endif - /*! \overload Constructs an OpenGL framebuffer object and binds a texture to the @@ -896,17 +849,6 @@ QGLFramebufferObject::QGLFramebufferObject(const QSize &size, Attachment attachm d->init(this, size, attachment, target, internal_format); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -QGLFramebufferObject::QGLFramebufferObject(const QSize &size, Attachment attachment, - QMacCompatGLenum target, QMacCompatGLenum internal_format) - : d_ptr(new QGLFramebufferObjectPrivate) -{ - Q_D(QGLFramebufferObject); - d->init(this, size, attachment, target, internal_format); -} -#endif - /*! \fn QGLFramebufferObject::~QGLFramebufferObject() @@ -1182,14 +1124,6 @@ void QGLFramebufferObject::drawTexture(const QRectF &target, GLuint textureId, G const_cast(QGLContext::currentContext())->drawTexture(target, textureId, textureTarget); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLFramebufferObject::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) -{ - const_cast(QGLContext::currentContext())->drawTexture(target, textureId, textureTarget); -} -#endif - /*! \since 4.4 @@ -1205,14 +1139,6 @@ void QGLFramebufferObject::drawTexture(const QPointF &point, GLuint textureId, G const_cast(QGLContext::currentContext())->drawTexture(point, textureId, textureTarget); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLFramebufferObject::drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) -{ - const_cast(QGLContext::currentContext())->drawTexture(point, textureId, textureTarget); -} -#endif - /*! \reimp */ int QGLFramebufferObject::metric(PaintDeviceMetric metric) const { diff --git a/src/opengl/qglframebufferobject.h b/src/opengl/qglframebufferobject.h index 481b8a3cd..730c686b2 100644 --- a/src/opengl/qglframebufferobject.h +++ b/src/opengl/qglframebufferobject.h @@ -80,16 +80,6 @@ public: QGLFramebufferObject(const QSize &size, const QGLFramebufferObjectFormat &format); QGLFramebufferObject(int width, int height, const QGLFramebufferObjectFormat &format); -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS - QGLFramebufferObject(const QSize &size, QMacCompatGLenum target = GL_TEXTURE_2D); - QGLFramebufferObject(int width, int height, QMacCompatGLenum target = GL_TEXTURE_2D); - - QGLFramebufferObject(const QSize &size, Attachment attachment, - QMacCompatGLenum target = GL_TEXTURE_2D, QMacCompatGLenum internal_format = GL_RGBA8); - QGLFramebufferObject(int width, int height, Attachment attachment, - QMacCompatGLenum target = GL_TEXTURE_2D, QMacCompatGLenum internal_format = GL_RGBA8); -#endif - virtual ~QGLFramebufferObject(); QGLFramebufferObjectFormat format() const; @@ -113,10 +103,6 @@ public: void drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget = GL_TEXTURE_2D); void drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget = GL_TEXTURE_2D); -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS - void drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget = GL_TEXTURE_2D); - void drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget = GL_TEXTURE_2D); -#endif static bool hasOpenGLFramebufferBlit(); static void blitFramebuffer(QGLFramebufferObject *target, const QRect &targetRect, @@ -159,11 +145,6 @@ public: void setInternalTextureFormat(GLenum internalTextureFormat); GLenum internalTextureFormat() const; -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS - void setTextureTarget(QMacCompatGLenum target); - void setInternalTextureFormat(QMacCompatGLenum internalTextureFormat); -#endif - bool operator==(const QGLFramebufferObjectFormat& other) const; bool operator!=(const QGLFramebufferObjectFormat& other) const; diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 4b72e2936..f87cafdd1 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -347,13 +347,6 @@ void QGLPixelBuffer::updateDynamicTexture(GLuint texture_id) const #endif } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -void QGLPixelBuffer::updateDynamicTexture(QMacCompatGLuint texture_id) const -{ - updateDynamicTexture(GLuint(texture_id)); -} -#endif - /*! Returns the size of the pbuffer. */ @@ -479,15 +472,6 @@ GLuint QGLPixelBuffer::bindTexture(const QImage &image, GLenum target) #endif } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -GLuint QGLPixelBuffer::bindTexture(const QImage &image, QMacCompatGLenum target) -{ - Q_D(QGLPixelBuffer); - return d->qctx->bindTexture(image, target, QMacCompatGLint(GL_RGBA8)); -} -#endif - /*! \overload Generates and binds a 2D GL texture based on \a pixmap. @@ -506,15 +490,6 @@ GLuint QGLPixelBuffer::bindTexture(const QPixmap &pixmap, GLenum target) #endif } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -GLuint QGLPixelBuffer::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target) -{ - Q_D(QGLPixelBuffer); - return d->qctx->bindTexture(pixmap, target, QMacCompatGLint(GL_RGBA8)); -} -#endif - /*! \overload Reads the DirectDrawSurface (DDS) compressed file \a fileName and @@ -541,15 +516,6 @@ void QGLPixelBuffer::deleteTexture(GLuint texture_id) d->qctx->deleteTexture(texture_id); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLPixelBuffer::deleteTexture(QMacCompatGLuint texture_id) -{ - Q_D(QGLPixelBuffer); - d->qctx->deleteTexture(texture_id); -} -#endif - /*! \since 4.4 @@ -565,15 +531,6 @@ void QGLPixelBuffer::drawTexture(const QRectF &target, GLuint textureId, GLenum d->qctx->drawTexture(target, textureId, textureTarget); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLPixelBuffer::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) -{ - Q_D(QGLPixelBuffer); - d->qctx->drawTexture(target, textureId, textureTarget); -} -#endif - /*! \since 4.4 @@ -588,15 +545,6 @@ void QGLPixelBuffer::drawTexture(const QPointF &point, GLuint textureId, GLenum d->qctx->drawTexture(point, textureId, textureTarget); } -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLPixelBuffer::drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget) -{ - Q_D(QGLPixelBuffer); - d->qctx->drawTexture(point, textureId, textureTarget); -} -#endif - /*! Returns the format of the pbuffer. The format may be different from the one that was requested. diff --git a/src/opengl/qglpixelbuffer.h b/src/opengl/qglpixelbuffer.h index 83fcd371c..8f9daece4 100644 --- a/src/opengl/qglpixelbuffer.h +++ b/src/opengl/qglpixelbuffer.h @@ -79,18 +79,6 @@ public: void drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget = GL_TEXTURE_2D); void drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget = GL_TEXTURE_2D); -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS - bool bindToDynamicTexture(QMacCompatGLuint texture); - void updateDynamicTexture(QMacCompatGLuint texture_id) const; - GLuint bindTexture(const QImage &image, QMacCompatGLenum target = GL_TEXTURE_2D); - GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum target = GL_TEXTURE_2D); - - void drawTexture(const QRectF &target, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget = GL_TEXTURE_2D); - void drawTexture(const QPointF &point, QMacCompatGLuint textureId, QMacCompatGLenum textureTarget = GL_TEXTURE_2D); - - void deleteTexture(QMacCompatGLuint texture_id); -#endif - QSize size() const; Qt::HANDLE handle() const; QImage toImage() const; diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index d0889404e..410d2ea39 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -3269,86 +3269,6 @@ bool QGLShader::hasOpenGLShaders(ShaderType type, const QGLContext *context) return true; } - - -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS -/*! \internal */ -void QGLShaderProgram::setAttributeArray - (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride) -{ - setAttributeArray(location, GLenum(type), values, tupleSize, stride); -} - -/*! \internal */ -void QGLShaderProgram::setAttributeArray - (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride) -{ - setAttributeArray(name, GLenum(type), values, tupleSize, stride); -} - -/*! \internal */ -void QGLShaderProgram::setAttributeBuffer - (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride) -{ - setAttributeBuffer(location, GLenum(type), offset, tupleSize, stride); -} - -/*! \internal */ -void QGLShaderProgram::setAttributeBuffer - (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride) -{ - setAttributeBuffer(name, GLenum(type), offset, tupleSize, stride); -} - -/*! \internal */ -void QGLShaderProgram::setUniformValue(int location, QMacCompatGLint value) -{ - setUniformValue(location, GLint(value)); -} - -/*! \internal */ -void QGLShaderProgram::setUniformValue(int location, QMacCompatGLuint value) -{ - setUniformValue(location, GLuint(value)); -} - -/*! \internal */ -void QGLShaderProgram::setUniformValue(const char *name, QMacCompatGLint value) -{ - setUniformValue(name, GLint(value)); -} - -/*! \internal */ -void QGLShaderProgram::setUniformValue(const char *name, QMacCompatGLuint value) -{ - setUniformValue(name, GLuint(value)); -} - -/*! \internal */ -void QGLShaderProgram::setUniformValueArray(int location, const QMacCompatGLint *values, int count) -{ - setUniformValueArray(location, (const GLint *)values, count); -} - -/*! \internal */ -void QGLShaderProgram::setUniformValueArray(int location, const QMacCompatGLuint *values, int count) -{ - setUniformValueArray(location, (const GLuint *)values, count); -} - -/*! \internal */ -void QGLShaderProgram::setUniformValueArray(const char *name, const QMacCompatGLint *values, int count) -{ - setUniformValueArray(name, (const GLint *)values, count); -} - -/*! \internal */ -void QGLShaderProgram::setUniformValueArray(const char *name, const QMacCompatGLuint *values, int count) -{ - setUniformValueArray(name, (const GLuint *)values, count); -} -#endif - #endif // !defined(QT_OPENGL_ES_1) QT_END_NAMESPACE diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h index 882e0cd8f..035b9270c 100644 --- a/src/opengl/qglshaderprogram.h +++ b/src/opengl/qglshaderprogram.h @@ -203,17 +203,6 @@ public: void setAttributeBuffer (const char *name, GLenum type, int offset, int tupleSize, int stride = 0); -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS - void setAttributeArray - (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0); - void setAttributeArray - (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0); - void setAttributeBuffer - (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0); - void setAttributeBuffer - (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0); -#endif - void enableAttributeArray(int location); void enableAttributeArray(const char *name); void disableAttributeArray(int location); @@ -223,17 +212,6 @@ public: int uniformLocation(const QByteArray& name) const; int uniformLocation(const QString& name) const; -#ifdef Q_MAC_COMPAT_GL_FUNCTIONS - void setUniformValue(int location, QMacCompatGLint value); - void setUniformValue(int location, QMacCompatGLuint value); - void setUniformValue(const char *name, QMacCompatGLint value); - void setUniformValue(const char *name, QMacCompatGLuint value); - void setUniformValueArray(int location, const QMacCompatGLint *values, int count); - void setUniformValueArray(int location, const QMacCompatGLuint *values, int count); - void setUniformValueArray(const char *name, const QMacCompatGLint *values, int count); - void setUniformValueArray(const char *name, const QMacCompatGLuint *values, int count); -#endif - void setUniformValue(int location, GLfloat value); void setUniformValue(int location, GLint value); void setUniformValue(int location, GLuint value); diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 6513bd404..3a826a141 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -75,9 +75,6 @@ QT_BEGIN_NAMESPACE Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp -#ifdef QT_MAC_USE_COCOA -extern void *qt_current_nsopengl_context(); // qgl_mac.mm -#endif #define QREAL_MAX 9e100 #define QREAL_MIN -9e100 @@ -2676,8 +2673,6 @@ quint64 QGLMaskTextureCache::hash(const QPainterPath &p, const QTransform &m, qr } h += FloatToQuint64(m.m11()); -#ifndef Q_OS_WINCE // ### - //Compiler crashes for arm on WinCE h += FloatToQuint64(m.m12()) << 4; h += FloatToQuint64(m.m13()) << 8; h += FloatToQuint64(m.m21()) << 12; @@ -2685,7 +2680,6 @@ quint64 QGLMaskTextureCache::hash(const QPainterPath &p, const QTransform &m, qr h += FloatToQuint64(m.m23()) << 20; h += FloatToQuint64(m.m31()) << 24; h += FloatToQuint64(m.m32()) << 28; -#endif h += FloatToQuint64(m.m33()) << 32; h += FloatToQuint64(w); @@ -4101,11 +4095,6 @@ void QOpenGLPaintEngine::drawTextureRect(int tx_width, int tx_height, const QRec #endif } -Qt::HANDLE QOpenGLPaintEngine::handle() const -{ - return 0; -} - static const int x_margin = 1; static const int y_margin = 0;