diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 0d862350a7..1b2dd37c9b 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -757,7 +757,7 @@ SceneOpenGL::Texture::Texture(OpenGLBackend *backend) SceneOpenGL::Texture::Texture(OpenGLBackend *backend, const QPixmap &pix, GLenum target) : GLTexture(*backend->createBackendTexture(this)) { - load(pix, target); + GLTexture::load(pix.toImage(), target); } SceneOpenGL::Texture::~Texture() @@ -787,14 +787,6 @@ bool SceneOpenGL::Texture::load(xcb_pixmap_t pix, const QSize &size, int depth) return d->loadTexture(pix, size, depth); } -bool SceneOpenGL::Texture::load(const QPixmap& pixmap, GLenum target) -{ - if (pixmap.isNull()) - return false; - - return GLTexture::load(pixmap.toImage(), target); -} - void SceneOpenGL::Texture::findTarget() { Q_D(Texture); diff --git a/scene_opengl.h b/scene_opengl.h index 8e258ce721..0d94855a69 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -166,7 +166,6 @@ public: Texture & operator = (const Texture& tex); using GLTexture::load; - virtual bool load(const QPixmap& pixmap, GLenum target = GL_TEXTURE_2D); virtual void discard(); bool update(const QRegion &damage);