StelTexture.hpp   StelTexture.hpp 
skipping to change at line 28 skipping to change at line 28
*/ */
#ifndef _STELTEXTURE_HPP_ #ifndef _STELTEXTURE_HPP_
#define _STELTEXTURE_HPP_ #define _STELTEXTURE_HPP_
#include "StelTextureTypes.hpp" #include "StelTextureTypes.hpp"
#include <QObject> #include <QObject>
#include <QImage> #include <QImage>
#include <QtOpenGL> #include <QtOpenGL>
//FIXME: After fully migrate to Qt 4.8 this condition need drop
#if QT_VERSION>=0x040800
#include <QGLFunctions>
#endif
class QFile; class QFile;
class StelTextureMgr; class StelTextureMgr;
class QNetworkReply; class QNetworkReply;
#ifndef GL_CLAMP_TO_EDGE #ifndef GL_CLAMP_TO_EDGE
#define GL_CLAMP_TO_EDGE 0x812F #define GL_CLAMP_TO_EDGE 0x812F
#endif #endif
// This class is just used internally to load the texture data. // This class is just used internally to load the texture data.
skipping to change at line 68 skipping to change at line 72
void directLoad(); void directLoad();
private: private:
QString path; QString path;
QNetworkReply* networkReply; QNetworkReply* networkReply;
}; };
//! @class StelTexture //! @class StelTexture
//! Base texture class. For creating an instance, use StelTextureMgr::creat eTexture() and StelTextureMgr::createTextureThread() //! Base texture class. For creating an instance, use StelTextureMgr::creat eTexture() and StelTextureMgr::createTextureThread()
//! @sa StelTextureSP //! @sa StelTextureSP
class StelTexture : public QObject class StelTexture
//FIXME: After fully migrate to Qt 4.8 this condition need drop
#if QT_VERSION>=0x040800
: public QObject, protected QGLFunctions
#else
: public QObject
#endif
{ {
Q_OBJECT Q_OBJECT
public: public:
//! Contains the parameters defining how a texture is created. //! Contains the parameters defining how a texture is created.
struct StelTextureParams struct StelTextureParams
{ {
StelTextureParams(bool qgenerateMipmaps=false, GLint afilter ing=GL_LINEAR, GLint awrapMode=GL_CLAMP_TO_EDGE) : StelTextureParams(bool qgenerateMipmaps=false, GLint afilter ing=GL_LINEAR, GLint awrapMode=GL_CLAMP_TO_EDGE) :
generateMipmaps(qgenerateMipmaps), generateMipmaps(qgenerateMipmaps),
filtering(afiltering), filtering(afiltering),
skipping to change at line 94 skipping to change at line 104
//! Define the wrapping mode to use. Must be one of GL_CLAMP _TO_EDGE, or GL_REPEAT. //! Define the wrapping mode to use. Must be one of GL_CLAMP _TO_EDGE, or GL_REPEAT.
GLint wrapMode; GLint wrapMode;
}; };
//! Destructor //! Destructor
virtual ~StelTexture(); virtual ~StelTexture();
//! Bind the texture so that it can be used for openGL drawing (call s glBindTexture). //! Bind the texture so that it can be used for openGL drawing (call s glBindTexture).
//! If the texture is lazyly loaded, this starts the loading and ret urn false immediately. //! If the texture is lazyly loaded, this starts the loading and ret urn false immediately.
//! @return true if the binding successfully occured, false if the t exture is not yet loaded. //! @return true if the binding successfully occured, false if the t exture is not yet loaded.
bool bind(); bool bind();
//! Return whether the texture can be binded, i.e. it is fully loade d //! Return whether the texture can be binded, i.e. it is fully loade d
bool canBind() const {return id!=0;} bool canBind() const {return id!=0;}
//! Return the width and heigth of the texture in pixels //! Return the width and heigth of the texture in pixels
bool getDimensions(int &width, int &height); bool getDimensions(int &width, int &height);
//! Get the error message which caused the texture loading to fail //! Get the error message which caused the texture loading to fail
//! @return the human friendly error message or empty string if no e rrors occured //! @return the human friendly error message or empty string if no e rrors occured
 End of changes. 3 change blocks. 
1 lines changed or deleted 12 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/