Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classStelTexture.html
Дата изменения: Unknown Дата индексирования: Tue Oct 2 05:12:59 2012 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п |
![]() |
Stellarium 0.11.4 | ||
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
Base texture class. More...
#include <StelTexture.hpp>
Classes | |
struct | StelTextureParams |
Contains the parameters defining how a texture is created. More... | |
Signals | |
void | loadingProcessFinished (bool error) |
Emitted when the texture is ready to be bind(), i.e. | |
Public Member Functions | |
virtual | ~StelTexture () |
Destructor. | |
bool | bind () |
Bind the texture so that it can be used for openGL drawing (calls glBindTexture). | |
bool | canBind () const |
Return whether the texture can be binded, i.e. it is fully loaded. | |
bool | getDimensions (int &width, int &height) |
Return the width and heigth of the texture in pixels. | |
const QString & | getErrorMessage () const |
Get the error message which caused the texture loading to fail. | |
const QString & | getFullPath () const |
Return the full path to the image file. | |
bool | isLoading () const |
Return whether the image is currently being loaded. | |
bool | glLoad () |
Load the texture already in the RAM to the openGL memory This function uses openGL routines and must be called in the main thread. |
Base texture class.
For creating an instance, use StelTextureMgr::createTexture() and StelTextureMgr::createTextureThread()
virtual StelTexture::~StelTexture | ( | ) | [virtual] |
Destructor.
bool StelTexture::bind | ( | ) |
Bind the texture so that it can be used for openGL drawing (calls glBindTexture).
If the texture is lazyly loaded, this starts the loading and return false immediately.
bool StelTexture::canBind | ( | ) | const [inline] |
Return whether the texture can be binded, i.e. it is fully loaded.
bool StelTexture::getDimensions | ( | int & | width, |
int & | height | ||
) |
Return the width and heigth of the texture in pixels.
const QString& StelTexture::getErrorMessage | ( | ) | const [inline] |
Get the error message which caused the texture loading to fail.
const QString& StelTexture::getFullPath | ( | ) | const [inline] |
Return the full path to the image file.
If the texture was downloaded from a remote location, this function return the full URL.
bool StelTexture::glLoad | ( | ) |
Load the texture already in the RAM to the openGL memory This function uses openGL routines and must be called in the main thread.
bool StelTexture::isLoading | ( | ) | const [inline] |
Return whether the image is currently being loaded.
void StelTexture::loadingProcessFinished | ( | bool | error | ) | [signal] |
Emitted when the texture is ready to be bind(), i.e.
when downloaded, imageLoading and glLoading is over 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()
error | is equal to true if an error occured while loading the texture |