StelTexture.hpp   StelTexture.hpp 
skipping to change at line 49 skipping to change at line 49
//! 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
{ {
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, bool qfilterMipmaps=false) :
generateMipmaps(qgenerateMipmaps), generateMipmaps(qgenerateMipmaps),
filterMipmaps(qfilterMipmaps),
filtering(afiltering), filtering(afiltering),
wrapMode(awrapMode) {;} wrapMode(awrapMode){;}
//! Define if mipmaps must be created. //! Define if mipmaps must be created.
bool generateMipmaps; bool generateMipmaps;
//! If true, mipmapped textures are filtered with GL_LINEAR_
MIPMAP_LINEAR instead of GL_LINEAR_MIPMAP_NEAREST (i.e. enabling "trilinear
" filtering)
bool filterMipmaps;
//! Define the scaling filter to use. Must be one of GL_NEAR EST or GL_LINEAR //! Define the scaling filter to use. Must be one of GL_NEAR EST or GL_LINEAR
GLint filtering; GLint filtering;
//! 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).
skipping to change at line 76 skipping to change at line 79
//! @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(int slot=0); bool bind(int slot=0);
//! 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);
//! Returns whether the texture has an alpha channel (GL_RGBA or GL_
LUMINANCE_ALPHA format)
//! This only returns valid information after the texture is fully l
oaded.
bool hasAlphaChannel() const { return alphaChannel ; }
//! 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
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( );}
skipping to change at line 147 skipping to change at line 154
//! The loader object //! The loader object
QFuture<GLData>* loader; QFuture<GLData>* loader;
//! The URL where to download the file //! The URL where to download the file
QString fullPath; QString fullPath;
//! True when something when wrong in the loading process //! True when something when wrong in the loading process
bool errorOccured; bool errorOccured;
//! True if this texture contains an alpha channel
bool alphaChannel;
//! Human friendly error message if loading failed //! Human friendly error message if loading failed
QString errorMessage; QString errorMessage;
//! 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
 End of changes. 6 change blocks. 
2 lines changed or deleted 16 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/