[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkstars=5D_kstars=3A_Remove_Texture_class=2E_It=27s_?=
From:       Khudyakov Alexey <alexey.skladnoy () gmail ! com>
Date:       2011-05-03 21:29:06
Message-ID: 20110503212906.E96E4A60AE () git ! kde ! org
[Download RAW message or body]

Git commit e81bd0b52628828efd9d27a6f74d2b77107e35a0 by Khudyakov Alexey.
Committed on 03/05/2011 at 23:15.
Pushed by khudyakov into branch 'master'.

Remove Texture class. It's not used anymore

M  +1    -1    kstars/CMakeLists.txt     
D  +0    -84   kstars/texture.cpp     
D  +0    -64   kstars/texture.h     

http://commits.kde.org/kstars/e81bd0b52628828efd9d27a6f74d2b77107e35a0

diff --git a/kstars/CMakeLists.txt b/kstars/CMakeLists.txt
index f768649..0c335b6 100644
--- a/kstars/CMakeLists.txt
+++ b/kstars/CMakeLists.txt
@@ -324,7 +324,7 @@ set(kstars_extra_SRCS
 	kstarssplash.cpp ksutils.cpp kswizard.cpp main.cpp 
 	simclock.cpp skymap.cpp skymapdrawabstract.cpp skymapqdraw.cpp skymapevents.cpp
 	skypainter.cpp skyqpainter.cpp
-	texture.cpp texturemanager.cpp
+	texturemanager.cpp
 	timezonerule.cpp 
 	thumbnailpicker.cpp thumbnaileditor.cpp binfilehelper.cpp
 	satellitegroup.cpp
diff --git a/kstars/texture.cpp b/kstars/texture.cpp
deleted file mode 100644
index 7a88de3..0000000
--- a/kstars/texture.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-    Copyright (C) 2010 Henry de Valence <hdevalence@gmail.com>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-*/
-
-#include "texture.h"
-#include "texturemanager.h"
-#include "skymap.h"
-#include "Options.h"
-
-#ifdef HAVE_OPENGL
-#include <QGLContext>
-#endif
-
-Texture::Texture(QObject* parent): QObject(parent)
-{
-    m_ready = false;
-#ifdef HAVE_OPENGL
-    m_tid = 0;
-#endif
-}
-
-#ifdef HAVE_OPENGL
-bool Texture::bind() const
-{
-    if( m_ready && Options::useGL() ) {
-        glBindTexture(GL_TEXTURE_2D, m_tid);
-        return true;
-    } else
-        return false;
-}
-#endif
-
-const QImage& Texture::image() const
-{
-    return m_image;
-}
-
-bool Texture::isReady() const
-{
-    return m_ready;
-}
-
-void Texture::setImage(const QImage& img)
-{
-    m_image = img;
-    m_ready = true;
-#ifdef HAVE_OPENGL
-    genTexture();
-#endif
-}
-
-#ifdef HAVE_OPENGL
-void Texture::genTexture()
-{
-    // //FIXME do proper mipmapping
-    // if( Options::useGL() ) {
-    //     if( !m_image.isNull() ) {
-    //         Q_ASSERT( TextureManager::getContext() );
-    //         m_tid = TextureManager::getContext()->bindTexture(m_image, \
                GL_TEXTURE_2D, GL_RGBA, QGLContext::DefaultBindOption);
-    //         m_ready = (m_tid != 0);
-    //         Q_ASSERT( m_ready );
-    //     } else
-    //         m_ready = false;
-    // }
-}
-#endif
-
-
-
diff --git a/kstars/texture.h b/kstars/texture.h
deleted file mode 100644
index 22e0b09..0000000
--- a/kstars/texture.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-    Copyright (C) 2010 Henry de Valence <hdevalence@gmail.com>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-*/
-
-#ifndef KSTEXTURE_H
-#define KSTEXTURE_H
-
-#include <config-kstars.h>
-
-#ifdef HAVE_OPENGL
-#include <GL/gl.h>
-#endif
-
-#include <QImage>
-
-class Texture : public QObject
-{
-    Q_OBJECT
-    friend class TextureManager;
-
-public:
-    ///Returns true if the texture is ready to be used. If false, don't try to use \
                the texture.
-    bool isReady() const;
-    ///Get a pointer to the image associated with this texture
-    const QImage& image() const;
-    ///Bind the texture for use with GL -- return true if successful
-#ifdef HAVE_OPENGL
-    bool bind() const;
-#endif
-    
-protected:
-    Texture(QObject *parent = 0);
-
-#ifdef HAVE_OPENGL
-    void genTexture();
-#endif
-
-protected slots:
-    void setImage(const QImage& img);
-
-private:
-    QImage m_image;
-    bool m_ready;
-#ifdef HAVE_OPENGL
-    GLuint m_tid;
-#endif
-};
-
-#endif // KSTEXTURE_H


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic