StelTexture.hpp   StelTexture.hpp 
skipping to change at line 41 skipping to change at line 41
class QNetworkReply; class QNetworkReply;
template <class T> class QFuture; template <class T> class QFuture;
#ifndef GL_CLAMP_TO_EDGE #ifndef GL_CLAMP_TO_EDGE
#define GL_CLAMP_TO_EDGE 0x812F #define GL_CLAMP_TO_EDGE 0x812F
#endif #endif
//! @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: public QObject, protected QOpenGLFunctions
{ {
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, bool qfilterMipmaps=false) : StelTextureParams(bool qgenerateMipmaps=false, GLint afilter ing=GL_LINEAR, GLint awrapMode=GL_CLAMP_TO_EDGE, bool qfilterMipmaps=false) :
generateMipmaps(qgenerateMipmaps), generateMipmaps(qgenerateMipmaps),
filterMipmaps(qfilterMipmaps), filterMipmaps(qfilterMipmaps),
skipping to change at line 94 skipping to change at line 94
//! @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
const QString& getErrorMessage() const {return errorMessage;} const QString& getErrorMessage() const {return errorMessage;}
//! Return the full path to the image file. //! Return the full path to the image file.
//! If the texture was downloaded from a remote location, this funct ion return the full URL. //! If the texture was downloaded from a remote location, this funct ion return the full URL.
const QString& getFullPath() const {return fullPath;} const QString& getFullPath() const {return fullPath;}
//! Return whether the image is currently being loaded //! Return whether the image is currently being loaded
bool isLoading() const {return (loader || networkReply) && !canBind( );} bool isLoading() const {return (loader || networkReply) && !canBind( );}
//! Return texture memory size
unsigned int getGlSize() const {return glSize;}
signals: signals:
//! Emitted when the texture is ready to be bind(), i.e. when downlo aded, imageLoading and glLoading is over //! Emitted when the texture is ready to be bind(), i.e. when downlo aded, imageLoading and glLoading is over
//! or when an error occured and the texture will never be available //! or when an error occured and the texture will never be available
//! In case of error, you can query what the problem was by calling getErrorMessage() //! In case of error, you can query what the problem was by calling getErrorMessage()
//! @param error is equal to true if an error occured while loading the texture //! @param error is equal to true if an error occured while loading the texture
void loadingProcessFinished(bool error); void loadingProcessFinished(bool error);
private slots: private slots:
void onNetworkReply(); void onNetworkReply();
skipping to change at line 173 skipping to change at line 176
//! OpenGL id //! OpenGL id
GLuint id; GLuint id;
//! Cached average luminance //! Cached average luminance
float avgLuminance; float avgLuminance;
GLsizei width; //! Texture image width GLsizei width; //! Texture image width
GLsizei height; //! Texture image height GLsizei height; //! Texture image height
//! Size in GL memory //! Size in GL memory
int glSize; unsigned int glSize;
}; };
#endif // _STELTEXTURE_HPP_ #endif // _STELTEXTURE_HPP_
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 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/